[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] help - making a cron job to auto delete files, earlier than a specific date



Hi all,

On Wed, 8 Aug 2001 19:25:51 +1000
"Todd Kirk" <tkirk@xxxxxxxxxxxxxx> wrote:
> Wow what a subject line...
> 
> Not sure if this is off topic or not, but hopefully you wonderful
> people
> will help me ;-)
> 
> I need to create a daily cron job that will delete all files in a
> specific
> directory that are 15 days or older than the current date.


find /PATH_OF_THE_FILES_TO_DELETE -ctime +15 -exec rm \{\} \;

Try it ( and modify it eventually) Put this line in crontab ...

But be carefull, don't forget to specify the PATH, otherwise, you will
have a strange surprise :-((

Hope this helps

CU

Samuel