[CLUE-Tech] FTP scripts to poll directory for a file?

Jeff Cann j.cann at isuma.org
Mon Mar 1 06:19:14 MST 2004


On Monday 01 March 2004 12:28 am, Angelo Bertolli wrote:
> Well how frequently do you want to poll?
>
> wget -b -t 0 --waitretry=20 ftp://something/something/file
>
> Will poll every 20 seconds

Angelo,

Thanks for the response,  I tried the following and it does not retry if the 
file is not missing -- it will retry the user (or anonymous if user not 
specified) cannot connect:

$ wget --tries=0 --waitretry=30 ftp://jccann@jumanji//state/eds_on
--06:06:57--  ftp://jccann@jumanji//state/eds_on
           => `eds_on'
Resolving jumanji .. done.
Connecting to jumanji[192.168.254.48]:21... connected.
Logging in as jccann ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /state ... done.
==> PORT ... done.    ==> RETR eds_on ...
No such file `eds_on'.  
(then wget exits)
$

I think perhaps the retry is a connection retry, not a file retry.  The 
'retry' option would be more convenient to retry if the file is missing.  No 
problem though, I wrote a simple shell script wrapper that will sleep for X 
seconds if the file was not retrieved.

Thanks!
Jeff

-- 
http://isuma.org/



More information about the clue-tech mailing list