This is simplest example running wget:
wget http://www.example.com/images/misc/pic.png
but how to make wget skip download if pic.png
is already available?
This is simplest example running wget:
wget http://www.example.com/images/misc/pic.png
but how to make wget skip download if pic.png
is already available?
Try the following parameter:
Sample usage:
The
-nc
,--no-clobber
option isn't the best solution as newer files will not be downloaded. One should use-N
instead which will download and overwrite the file only if the server has a newer version, so the correct answer is:When running Wget with
-r
or-p
, but without-N
,-nd
, or-nc
, re-downloading a file will result in the new copy simply overwriting the old.So adding
-nc
will prevent this behavior, instead causing the original version to be preserved and any newer copies on the server to be ignored.See more info at GNU.
The answer I was looking for is at https://unix.stackexchange.com/a/9557/114862.