Recursive wget

From HeepyWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

How to wget something recursively without pulling lots of unnecessary crud

-r means descend recursively

-np means never follow a link upward

-nH means don't put everything in a hostname subdir

 wget -nH -r -np http://blah.blah.com/blah

add -N to turn on timestamping, so files already stored locally will not be downloaded again unless changed.

add '-A suffix' to download only files with suffix 'suffix'

wget -nH -r -np -A gif,jpg -N http://blah.blah.com/blah