Re: Deleting files in a directory more than 5 days old

2004-07-27 Thread Vic Cross
On Thu, 22 Jul 2004, Post, Mark K wrote: If you want files that are older than 5 days, and haven't been accessed in that time, the -atime predicate does that. Beware that some distro vendors and performance mavens are starting to recommend that the noatime mount option be used to increase disk

Deleting files in a directory more than 5 days old

2004-07-22 Thread James Melin
I am wondering what string of commands are necessary to delete all files in a directory that were created more than 5 days previously. I know it's gonna be a compound command and/or script but I'm not sure what exectly to code. Anyone have anything in their bag of tricks I could adapt?

Re: Deleting files in a directory more than 5 days old

2004-07-22 Thread Giorgio Bellussi
find directory -ctime +5 -exec rm {} \; (...but I still have some doubt about +5 ...) James Melin wrote: I am wondering what string of commands are necessary to delete all files in a directory that were created more than 5 days previously. I know it's gonna be a compound command and/or script but

Re: Deleting files in a directory more than 5 days old

2004-07-22 Thread Bob
find dir path -mtime +5 -exec rm {} \; On Thu, 22 Jul 2004 09:53:02 -0500, James Melin [EMAIL PROTECTED] wrote: I am wondering what string of commands are necessary to delete all files in a directory that were created more than 5 days previously. I know it's gonna be a compound command and/or

Re: Deleting files in a directory more than 5 days old

2004-07-22 Thread Ferguson, Neale
find ./ -mtime 5 -type f | xargs rm This will remove files last modified 5*24 hours ago from the current and subsequent directories. -Original Message- I am wondering what string of commands are necessary to delete all files in a directory that were created more than 5 days previously. I

Re: Deleting files in a directory more than 5 days old

2004-07-22 Thread Fargusson.Alan
, July 22, 2004 8:06 AM To: [EMAIL PROTECTED] Subject: Re: Deleting files in a directory more than 5 days old find directory -ctime +5 -exec rm {} \; (...but I still have some doubt about +5 ...) James Melin wrote: I am wondering what string of commands are necessary to delete all files

Re: Deleting files in a directory more than 5 days old

2004-07-22 Thread Kohrs, Steven
On Thu, 2004-07-22 at 09:53, James Melin wrote: I am wondering what string of commands are necessary to delete all files in a directory that were created more than 5 days previously. I know it's gonna be a compound command and/or script but I'm not sure what exectly to code. Anyone have

Re: Deleting files in a directory more than 5 days old

2004-07-22 Thread Post, Mark K
Port [mailto:[EMAIL PROTECTED] On Behalf Of James Melin Sent: Thursday, July 22, 2004 10:53 AM To: [EMAIL PROTECTED] Subject: Deleting files in a directory more than 5 days old I am wondering what string of commands are necessary to delete all files in a directory that were created more than 5 days

Re: Deleting files in a directory more than 5 days old

2004-07-22 Thread Malcolm Beattie
Post, Mark K writes: Finally, there is a subtle difference between doing an -exec rm and piping the output of find to an xargs rm command. The difference there is that the find command will invoke the rm command once for each file that it finds that matches your criteria. The xargs version

Re: Deleting files in a directory more than 5 days old

2004-07-22 Thread Post, Mark K
files in a directory more than 5 days old Post, Mark K writes: Finally, there is a subtle difference between doing an -exec rm and piping the output of find to an xargs rm command. The difference there is that the find command will invoke the rm command once for each file that it finds