hi, in trying to maintain your directories, one needs to do some housekeeping like removing old files. the tool "find" comes in handy. but how would you decide which option to use when it comes to, say, deleting files that are older than 5 days?
mtime - last modified
atime - last accessed
ctime - last changed
ctime is quite easy to understand. but mtime and atime? how do you differentiate?
i normally use mtime. would i be missing something if i don't use atime?
If a file is seldom changed, but often read, mtime and ctime would show the file as old, even if it's not.
If a file is only temporary (eg. spooled from a DB), and only used once, mtime would be a good bet.
I can't think of a good example for ctime, as it's only changed when the inode associated with the file changes, eg. changes in file size or name.
hmmm, there are Oracle files that gets created daily but need only for rollbacks. otherwise they accumulate like gremlins. i just need to keep 5 days worth.
ctime == last time the inode changed - ie., chmod, chown, etc.
atime == last time the file was read
mtime == last time the file was written, or open append and closed without writing.