[nmglug] filezilla,cron
Nick Frost
nickf at frostitute.com
Mon Apr 4 07:49:40 PDT 2011
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
----------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4372 bytes
Desc: not available
URL: <http://lists.nmglug.org/pipermail/nmglug-nmglug.org/attachments/20110404/f061051c/attachment-0001.bin>
More information about the nmglug
mailing list