Matt Wilkie wrote:
Dear wget,
I have scripts which rely on wget to handle knowing whether a given
file needs to be downloaded or not. Normally this works quite well,
but in some circumstances (as I've learned the hard way):
wget -c foobar.zip # 2009-march-01, 545kb
wget -c foobar.zip # 2009-march-15, 570kb
In this sequence, the second archive version is 45kb larger than the
first. wget just asks for the tailing bit of the second and dumps it
on the end of the local file: corrupt archive.
It will also pass over an update where the second newer archive is
_smaller_.
Sooo, what can we do instead? Rsync is my fav, but what do you do when
the data provider doesn't use it?
thanks,
The -N option, also called --timestamping will take into account the
timestamps, and download the file only if newer than local, so it can be
used to replace -c in that case.
.