Unfortunately, in some cases at least, wget return codes are nearly
meaningless.  When trying to mirror an ftp site for example, the return
code appears to only indicate if the server could be contacted and has
nothing to do with the success of the requested operation.

The situation is probably better for single file retrieval, but for
mirroring the return codes are not helpful.

Jim


On Tue, 1 Mar 2005, Leonid wrote:

> Seb_kramm,
> 
> > Is it just 0-success/1-failure,
> 
>   So far, for many cases it is just that.
> 
> > How can the script know if the page it's trying to fetch is existent or not
> ?
> 
>   If wget retunred code 0, this means the page is downloaded, therefore,
> it exists. :-) If it returned code 1, the page is not downloaded.
> Does your script really need to know _why_ wget failed: because of
> wrong URL or because the remote URL was down and wget exceeded the
> number of retrying attempts? I agree it would be nice to have this
> feature in wget, but in fact there may be miriad of reasons: wrong
> URL, unreachable host, permission denied, local filesystem full,
> no permission to write in local directory, etc, so this may not
> be as usefull as it seems.
> 
> Leonid (just another user)
> 

Reply via email to