thanks to sourceforge,
here is a url from soruceforge net,

  http://images.sourceforge.net/icons/silk/feed.png

has a Last-Modified header of 'Tue, 05 Dec 2006 19:10:40 GMT'

consider these two  command:

1,
 wget  -N -O dir/feed.png \
    http://images.sourceforge.net/icons/silk/feed.png
 wget  -N -O feed.png \
   http://images.sourceforge.net/icons/silk/feed.png

2,
 wget  -N  \
    http://images.sourceforge.net/icons/silk/feed.png

1:
target file always downloaded if there is no file named 'feed.png' in
current working directory.

if there is a file named 'feed.png' in current working dir.,
then wget will check that file,
and if that file is same as target, no download happens.

but wget is supposed to check `dir/feed.png', not `$PWD/feed.png',
could this be a bug?

2:
target is  downloaded only once.
mtime, ctime and atime of local file remain its first download time,
that is, wget dont always `open()' local file , it just `stat()' that file.

if `-O' option is given, then wget always open local file, truncate it
to zero length,
the result is target downloaded as many times as wget run.

i guess even with `-O' option, wget should check local file first,
instead of truncate it for every run.

the case of given muiltiple Urls and single `-O' is rare,
and maybe not clearly stated in the manual.

Reply via email to