Re: File delete script not working
- From: Allen Kistler <ackistler@xxxxxxxxx>
- Date: Sat, 19 Aug 2006 03:07:01 GMT
mydejamail@xxxxxxxxxxx wrote:
I having a problem applying this script, it just doesn't seem to work.
The purpose is to delete all files over 30 days old. The directories
are 1,2,3,4,5.
Can anyone who knows about find and xargs please help.
It does not from the command line or a cron job.
cd /var/www/html/zm/events
find 1 -type f -mtime +30 | xargs rm -f
find 2 -type f -mtime +30 | xargs rm -f
find 3 -type f -mtime +30 | xargs rm -f
find 4 -type f -mtime +30 | xargs rm -f
find 5 -type f -mtime +30 | xargs rm -f
Why not:
find [12345] -type f -mtime +30 -exec rm -f {} \;
.
- Follow-Ups:
- Re: File delete script not working
- From: Chris F.A. Johnson
- Re: File delete script not working
- References:
- File delete script not working
- From: mydejamail
- File delete script not working
- Prev by Date: Re: windows to linux relation
- Next by Date: Trying to get Pan compiled and working in Fedora core 4
- Previous by thread: Re: File delete script not working
- Next by thread: Re: File delete script not working
- Index(es):
Relevant Pages
|