When a file was written to a directory is not the same thing as when it was last modified. I'd think you'd want the file creation time, and the Perl stat command doesn't seem to have that:
8 atime last access time since the epoch
9 mtime last modify time since the epoch
10 ctime inode change time (NOT creation time!) since the epoch
And neither does the Unix stat() command:
struct stat {
,,,
time_t st_atime; /* time of last access */
time_t st_mtime; /* time of last modification */
time_t st_ctime; /* time of last change */
};
So in answer to your question, you're pretty much out of luck unless (a) you have control of the writing and can add a few lines to a script to store the write times or (b) you know that files will only be written, not modified, in which case modification time will do fine.
EDIT: Incidently, your answer was completely useless, BUU. If it's so easy to find the info, you might as well copy and paste it into your post instead of flaming the poster. -- |