Note that the ctime field in the inode is inode changed time, which may not be when 
the file was created.  I have always thought that Unix and Linux should keep track of 
the actual file creation time.

-----Original Message-----
From: Giorgio Bellussi [mailto:[EMAIL PROTECTED]
Sent: Thursday, 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 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?
>
>----------------------------------------------------------------------
>For LINUX-390 subscribe / signoff / archive access instructions,
>send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
>http://www.marist.edu/htbin/wlvindex?LINUX-390
>
>
>

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to