[Ma-linux] Re: [Novalug] weekly cron job

Jeff Stoner leapfrog at freeshell.org
Fri Jan 4 12:31:10 EST 2008


On Fri, 4 Jan 2008, Jay Hart wrote:

> find -type f -atime +12 | xargs ls -l
>
> find -type f -mtime +12 | xargs ls -l

> I believe I should run the mtime option as opposed to the atime option, but
> I'm wondering if this will do for me what I want.

Remember, each file has 3 timestamps associated with it, atime, mtime and 
ctime. The atime records when the file was last accessed and is probably 
the most frequently updated timestamp (hence the 'noatime' mount option 
available with some file systems.) mtime is when the file's contents where 
last modified. ctime is when the inode was last modified.

Renaming a file changes the ctime but not the atime or mtime.
Doing a head/tail on a file changes the atime but not mtime or ctime.
Editing a file but not saving it changes the atime but not mtime or ctime.
Saving your edit changes the atime and mtime but not ctime.



--Jeff

"I am not available for comment"



More information about the Novalug mailing list