[nmglug] filezilla,cron

David Borton dave at famjam.net
Mon Apr 4 08:05:28 PDT 2011


Right, Nick's suggestion will take care of the file handling on the
client side.  But back to basics for a second-

You don't have to worry about where the cron file is... just use this
command (per Michael) to edit it:

    crontab -e

I think you are realizing that filezilla is probably not the right tool
for the job, since you don't need a GUI.    An FTP script can do the job.

So you write a shell script that does the file handling and then runs an
FTP script which will do the file transfer.    Here's a decent
explanation and example I found on the web: 
http://www.reallylinux.com/docs/autoftp.shtml

Happy computing,
    David


On 04/04/2011 08:49 AM, Nick Frost wrote:
> On Apr 4, 2011, at 7:57 AM, a wrote:
>
>> There nothing in the cron file on my computer now.The file I would like
>> to purge contents cyclically is in
>> filezilla: /home/kaluta/kaluta.us/jerry-camera.
> Ok.  Now I *think* I see what you are trying to accomplish.
>
> I used to do this sort of thing 5 years ago with motion (http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome) and a web camera.
>
> Motion dumped files to disk when movement was detected by the USB web camera and then I simply used a cron job and a find script to delete and rotate files after 14 days.  I see if I can dig the drive out and pull the cron job and script, but it was along the lines of;
>
> #! /bin/bash
>
> cd /path/to/motion/capture/file/directory
>
> find . -name *.* -mtime +14 exec rm {} \;
>
> You can run the script with a cron job and/or have a cron job that turns motion on and off.  In my case I had motion turn the still and video capture on at 15:30pm daily, off at 0845AM and on during weekends...off during business hours.  The specific task at the time was to address vandalism at an office building.
>
> If you are logging to a single file instead of events, that complicates matters a bit.  You could have a cron job that renames the existing file and rotates a series of files with a timestamp, or you can simply remove the file above by replacing {} with <filename>.
>
> Hope that helps,
>
> -Nick
>
>
> ---------------------------------------
> Nicholas S. Frost
> 7 Avenida Vista Grande #325
> Santa Fe, NM  87508
> nickf at frostitute.com
> ----------------------------------------
>
>
>
> _______________________________________________
> nmglug mailing list
> nmglug at lists.nmglug.org
> http://lists.nmglug.org/listinfo.cgi/nmglug-nmglug.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nmglug.org/pipermail/nmglug-nmglug.org/attachments/20110404/11949769/attachment.htm>


More information about the nmglug mailing list