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

David Anselmi anselmi at anselmi.us
Mon Mar 1 10:50:04 MST 2004


Jeff Cann wrote:
> Hi,
> 
> Anyone have an FTP script that will poll a directory for a given file.  For 
> example, a process on a remote machine puts a file into a directory.  Another 
> machine (via FTP) will poll a directory for the expected file.  Once the file 
> is available, the FTP script gets it and removes it.

How about: the remote machine puts the file in the directory, then ssh's 
to the local machine which d/l's the file (rsync over ssh, or wget, may 
be better than ftp, but either should work in a script).

You can set up a key on the remote machine that is only allowed to run 
the rsync/ftp script on the local machine.

More info here: http://www.debian.org/mirror/push_mirroring and at the 
link at the bottom of that page.

[...]
> Mirror scripts are not useful in this case - the file is used to transfer 
> process state across two machines.

I suppose the above is a "mirror script" but I'm not sure what you mean 
by that, or why it won't work for you.

Dave




More information about the clue-tech mailing list