Cron Job (old file deletetion)
Posted by: cryscrys
Posted on: 2007-04-04 14:31:00
Okay, so basically, I just found out that using Cron I can delete files more than X days old every few days in a directory I specify. My issue is that I'm not really sure what to do next.
I've searched high and low on Google, and asked on another forum, but nothing was of too much help to me, so I'm hoping someone here using DH has used Cron on a site hosted by DH to help me with it.
Basically, the farthest I've gotten is seeing this code on every page that talked about deleting old files:
find /yourdir/tmp -mtime +1 -exec rm {} ; //where 1 is number of days since it was modified
I have NO clue how to execute this code, or where to put it, or whatever. I've seen mentions of telnet and ssl, but if that's the case, then I need help with that too.
I'm avoiding using PHP, since it's not helpful for every day auto-deletion, at least from what I've seen and tried.
Any help would be GREATLY appreciated. :)