As the question states how to instruct WGET to only download the same file if the existing one is older
e.g. fileA has a date / file stamp of 9.00AM 10/10/2011
e.g. fileA on the remote server has a date / file stamp of 11AM 10/10/2011
so wget will download FileA on the server as its newer (and overwrite the local file)
Any help would be greatly appreciated, I have heard this is possible, but after looking around for a while I havn't come up with anything
You can run the command above as many times as you like and Wget will download the file and overwrite the existing one. If you run the command above without the -O option, Wget will create a new file each time you run it.
The [option] flag lets you specify the action to perform with the wget command. The [URL] flag points to the address of the directory, file, or webpage that you wish to download.
The ' -r ' option is to retrieve recursively, and ' -nd ' to not create directories. Note that ' --delete-after ' deletes files on the local machine.
The wget tool is essentially a spider that scrapes / leeches web pages but some web hosts may block these spiders with the robots. txt files. Also, wget will not follow links on web pages that use the rel=nofollow attribute. You can however force wget to ignore the robots.
wget -N http://server/path/to/file.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With