Automatically pruning aged files
Posted by: designr
Posted on: 2008-06-18 13:18:00
All,
I have a few security cams around my house that are monitored by a motion-detection/recording application (SecuritySpy). This program uploads Quicktime movies and jpegs to an ftp site. This allows me to download pictures and videos off the web when my tweaked-out neighbors come over and steal concrete out of my driveway. (Crazy! I know. But that is their way.) I also like the idea of having off-site retention in case they break in and swipe my computer. The video doesn't use that much space -- it ran for 8 months and never reached the 200GB quota I set up for that account.
Anyway, Dreamhost is now billing me -- something about being "backup/non-web" content. It's not that much money for a couple of months' retention but, I still want to limit the amount of space used. Setting up a quota just sends me an email -- I still have to manually delete the old files. I would like to set up a cronjob that prunes my files based on age.
So, my question is: Can anybody suggest a script or a command that will automatically prune the files based on age? I saw a reference to weekly-pruning.sh in the Dreamhost Wiki but couldn't find the script.
Because I am not *nix native, writing the script is beyond me. However, I think I can figure out how to set up the cronjob.
Thanks in advance.
Brian