bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Any explanation for the '-nc' returned value?


From: Tim Rühsen
Subject: Re: [Bug-wget] Any explanation for the '-nc' returned value?
Date: Mon, 30 Jul 2018 17:00:15 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 30.07.2018 16:44, Yuxi Hao wrote:
> Let's take an example in practice.
> When there is a bad network connection, I try wget with '-nc' directly first, 
> if it fails, then I'll try it with proxy. If it says "File * already there ; 
> not retrieving.", and returns 1 as described (error occurred, failed), that 
> is so weird!

After the first try failed, you should explicitly move/remove the file
out of the way. That is not weird, it's a safety feature. It might save
you when having a typo or when an URL is retrieved that you itself can't
trust. You could easily overwrite files in your home directory, e.g.
.profile or .bashrc. That is easily used as an Remote Code Execution (RCE).

So no way we "fix" this ;-)

> And '-N' is not always working as desired, because of "Last-modified header 
> missing". One example:
> wget -N 
> https://www.gnu.org/software/wget/manual/html_node/Download-Options.html

If the server doesn't support it, it simply won't work.
All you can do is not to use -N or ask the server's admin to support it.

Regards, Tim

> 
> Best Regards,
> YX Hao
> 
> -----Original Message-----
> From: Dale R. Worley 
> To: Tim Rühsen
> Cc: lifenjoine; bug-wget
> Subject: Re: [Bug-wget] Any explanation for the '-nc' returned value?
> 
> Tim Rühsen <address@hidden> writes:
>>            -nd, even if -r or -p are in effect.)  When -nc is 
>> specified, this behavior is suppressed, and Wget will
>>            refuse to download newer copies of file.
> 
> Though strictly speaking, this doesn't say that wget will then exit with 
> error code 1.
> 
> Dale
> 
> 

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]