Showing results for 
Search instead for 
Did you mean: 

file date/time

Go to solution
Ken Englander
Regular Advisor

file date/time

Is this an accurate about the date/time information maintained for files.

There are three times maintained for a file, atime, ctime, and mtime. atime is the last access time, ctime is the file attribute change time, and mtime is the modification time.

Therefore, there is no creation time available?

James R. Ferguson
Acclaimed Contributor

Re: file date/time

Hi Ken:

Your statements are quite correct. See the manpages for 'stat(2)' for more information.

In UNIX, a "creation" timestamp is available only when the 'mtime' value represents the first instantiation of a file. Then, coincidentally, the 'mtime' is equivalent to a creation time.

The 'ctime' is changed by a alteration in permissions, ownership or name (as in a 'rename()' or 'mv'). Many backup utilities (like 'fbackup') modify the 'ctime' as a consequence of the backup session resetting the last access timestamp or 'atime'.


Ken Englander
Regular Advisor

Re: file date/time

Thanks James,

The information I posted in the question was what I found on the fcntl man page regarding the value of F_SETTIMES.

Thanks for confirming this!