Reputation: 33
I am downloading a website I have using wget -r http://example.com but in order for the css files to not be cached, the website adds GET parameters to those files such as styles.css?foobar.
How can I make it download the file and strip ?foobar from it?
Upvotes: 3
Views: 540
Reputation: 7582
You could rename the files after wget
completes.
find . -name '*\?*' | while read -r path ; do
mv "$path" "${path%\?*}"
done
Upvotes: 4