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
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?
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
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
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
, 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
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
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
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
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
10 matches
Mail list logo