[nmglug] filezilla auto delete script file contents

John Osmon josmon at rigozsaurus.com
Wed Jun 29 06:43:13 PDT 2011


On Wed, Jun 29, 2011 at 05:57:13AM -0600, a wrote:
> Would like to use the following script with crontab to delete specific
> file contents situated on filezilla.
> 
> "find /path/to/files* -mtime +5 -exec rm {} \;"
> 
> What is the "/path/to/files*" without using a "logon to filezilla
> script"?

The key is to hide the "FTPness" of the files -- usually with a FUSE
based filesytem.  Then, the problem becomes something much easier:

  a) mount the remote FTP site at (say) /FTP
  b) run your script with /path/to/files as /FTP

a) can be implemented in several ways.  A quick google search lead me 
to 'curlftpfs' that had decent explanation at:
    http://linux.byexamples.com/archives/344/mounting-ftp-host-to-local-directory-on-top-of-fuse/

curlftpfs may or may not be available with your distributios -- but
something similar to it should be.  There are *lots* of FUSE
implementations for all manner of protocols.


More information about the nmglug mailing list