Louis Gosselin wrote:
WGet version 1.8.1
wget -N http://host/file.html
WGet only downloads and overwrites the ./file.html if the local file is
older than the http copy.
As expected.
wget -O localfile.html -N http://host/remotefile.html
WGet will overwrite ./localfile.html if ./remotefile.html does not exist
or is older than http://host/remotefile.html.
The expected behavior would be that ./localfile.html would be checked
for timestamps instead of ./remotefile.html.
This is breaking my scripts because ./remotefile.html does not (and
should not) exist, resulting in the file always downloading.
The workaround for now is:
1. Move or copy the ./localfile.html to ./tmp/remotefile.html
2. wget without the -O
3. Move or copy the ./tmp/remotefile.html to ./localfile
hi louis,
-O and -N were never meant to work together. in fact, the upcoming 1.11
release of wget will forbid the use of -N if -O is given.
--
Aequam memento rebus in arduis servare mentem...
Mauro Tortonesi http://www.tortonesi.com
University of Ferrara - Dept. of Eng. http://www.ing.unife.it
GNU Wget - HTTP/FTP file retrieval tool http://www.gnu.org/software/wget
Deep Space 6 - IPv6 for Linux http://www.deepspace6.net
Ferrara Linux User Group http://www.ferrara.linux.it