Hi,

from the man pages (--no-clobber):

########
           When running Wget without -N, -nc, -r, or -p, downloading the
same file in the same directory will result
           in the original copy of file being preserved and the second
copy being named file.1.  If that file is
           downloaded yet again, the third copy will be named file.2,
and so on.  (This is also the behavior with
           -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.  Therefore,
""no-clobber"" is actually a misnomer in this
           mode---it's not clobbering that's prevented (as the numeric
suffixes were already preventing clobbering),
           but rather the multiple version saving that's prevented.
########

Regards, Tim

On 28.07.2018 15:52, Yuxi Hao wrote:
> Hi Guys,
> 
>  
> 
> The source code is:
> 
> ////////////////////////
> 
>       if (opt.noclobber && file_exists_p(opt.output_document, NULL))
> 
>            {
> 
>               /* Check if output file exists; if it does, exit. */
> 
>               logprintf (LOG_VERBOSE,
> 
>                          _("File %s already there; not retrieving.\n"),
> 
>                          quote (opt.output_document));
> 
>               exit (WGET_EXIT_GENERIC_ERROR);
> 
>            }
> 
> ////////////////////////
> 
>  
> 
> No explanation on it:
> 
> https://www.gnu.org/software/wget/manual/html_node/Exit-Status.html
> 
>  
> 
> I am confused on this. If it works as specified, why don’t we return succeed?
> 
>  
> 
> Best Regards,
> 
> YX Hao
> 
>  
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to