Mauro Tortonesi <[EMAIL PROTECTED]> writes:

> Toni Casueps wrote:
>> I use Wget 1.10 for Linux. If I use -O and there was already a file
>> in the current directory with the same name it overwrites it, even
>> if I use -nc. Is this a bug or intentional?
>
> IMVHO, this is a bug. if hrvoje does not provide a rationale for
> this behavior, i will fix it before the release of wget 1.11 (which
> should be pretty soon).

Overwriting the file without -nc (as opposed to using file.1 and so
on) is intentional -- if you specify the file name, that file name
gets used.

As for -nc, its work is based on the URL.  There can be more than one
URL, and it seems useful to only download the stuff that is actually
needed.  If you really need to download some URL iff the specified
output file doesn't exist, you can always do this:

    test -f file || wget -O file ...

Reply via email to