There are three dates you can use to make this kind of determination:
struct timespec st_atimespec; /* time of last access */
struct timespec st_mtimespec; /* time of last data modification */
struct timespec st_ctimespec; /* time of last file status change */
We use st_mtimespec. st_ctimespec, which I believe you're referring to here (at least, the documentation for find specifically says it's looking at the inode change time, not the file modification date), takes into account some operations that aren't explicitly "newer" -- things like chmod, chown, etc -- which are covered by Copy Different... st_ctimespec seems to me to not say the "file is newer", but rather the "inode is newer", which is much different, and a lot harder to explain to the non-technical.
Give it a try and see if you think the behavior is undesirable in practice...
__________________
--Dave Nanian
|