bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] Will "-O xxx" option ALWAYS create xxx file?


From: Toni Verdu Carbo
Subject: Re: [Bug-wget] Will "-O xxx" option ALWAYS create xxx file?
Date: Fri, 1 Oct 2010 19:14:38 +0200 (CEST)

OK, solved!

It was not wget fault. I was executing the script every 3 minutes via cron,
and xxx files had always the same name. Then I was changing the name each time
according to some rules... In some rare situations, downloading the file was
taking more than 3 minutes, so next script execution was overwriting xxx
file giving to undesirable results.

I've solved it adding -T 120 to the the wget command and using a different
name for the xxx file on each invocation.

Thanks.

Toni

On Thu, 30 Sep 2010, Toni Verdu Carbo wrote:

        Hi,

        I'm using wget (v1.10.2 on Ubuntu 8.04 LTS server). Is it possible
that using "-O xxx" option xxx file is NOT created??

        I'm using wget in an cron script to periodically download some file
with "wget -qO xxx url", and I was assuming that the file xxx would be
ALWAYS created, regardless of the result of the download, and the code after
wget was assuming that. So I was not doing any test to assure xxx did really
exist. But from time to time it seems that wget fails to create the file and
the following code reports "file xxx doesn't exist" type errors...

        For instance:

        wget -qO xxx "http://..."; # any URL
        ls xxx

most of times work, but sometimes it gives an error message "ls: cannot
access xxx: No such file or directory". Does this make sense?

        Of course I can add some test for the existence of the xxx file
after wget use, but the question is: is there any situation where "wget -qO
xxx ..." could NOT create file xxx, or the file should be created in ANY
situation?

        Thanks in advance,

        Toni


--
Toni Verdu Carbo
Departament d'Arquitectura i Tecnologia de Computadors (ATC)
Departament d'Enginyeria Electrica, Electronica i Automatica (EEEA)
Escola Politecnica Superior (EPS)- Universitat de Girona (UdG)
Girona - Catalunya - Spain - Europe - Earth - Milky Way - Universe ;^D

http://maps.google.com/maps?q=41.963248,%202.832033&t=h



reply via email to

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