Does anyone know the best way to automate the deletion of monitor files after they age two months? Thanks, Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050519/451d10cf/attachment.htm
On Thursday 19 May 2005 13:51, Steve Totaro wrote:> Does anyone know the best way to automate the deletion of monitor files > after they age two months?How about ... $ find /path/to/files -ctime +60 -exec rm {}\; Cheers, Gavin.
On 5/19/05, Steve Totaro <asterisk@totarotechnologies.com> wrote:> > Does anyone know the best way to automate the deletion of monitor files > after they age two months? > > Thanks, > Steve > _______________________________________________Something like: find /files/to/check/ -mtime 60 -exec rm {} \; put this in a crontab entry maybe and run each day. Mike
Matthew Boehm
2005-May-19 07:04 UTC
[Asterisk-Users] Deleting Monitor Files After 2 Months
Gavin Hamill wrote:> On Thursday 19 May 2005 13:51, Steve Totaro wrote: >> Does anyone know the best way to automate the deletion of monitor >> files after they age two months? > > How about ... > > $ find /path/to/files -ctime +60 -exec rm {}\; > > Cheers, > Gavin.Nice Gavin. I would further turn that into a shell script and pop it into cron to run nightly. -Matthew
----- Original Message ----- From: "Matthew Boehm" <mboehm@cytelcom.com> To: "Asterisk Users Mailing List - Non-Commercial Discussion" <asterisk-users@lists.digium.com> Sent: Thursday, May 19, 2005 10:04 AM Subject: Re: [Asterisk-Users] Deleting Monitor Files After 2 Months> Gavin Hamill wrote: >> On Thursday 19 May 2005 13:51, Steve Totaro wrote: >>> Does anyone know the best way to automate the deletion of monitor >>> files after they age two months? >> >> How about ... >> >> $ find /path/to/files -ctime +60 -exec rm {}\; >> >> Cheers, >> Gavin. > > Nice Gavin. I would further turn that into a shell script and pop it into > cron to run nightly. > > -Matthew >Thanks!
raa@mailporter.net
2005-May-19 12:01 UTC
[Asterisk-Users] Deleting Monitor Files After 2 Months
Matthew Boehm wrote:> Gavin Hamill wrote: > >>On Thursday 19 May 2005 13:51, Steve Totaro wrote: >> >>>Does anyone know the best way to automate the deletion of monitor >>>files after they age two months? >> >>How about ... >> >>$ find /path/to/files -ctime +60 -exec rm {}\; >> >>Cheers, >>Gavin. > > > Nice Gavin. I would further turn that into a shell script and pop it into > cron to run nightly.There is a package ( Redhat and derivatives at least ) called tmpwatch that does this kind of thing already. Check in /etc or use your package manager to see if it is aready installed or available. Rod -- --- [This E-mail scanned for viruses by Declude Virus]