1753522 Members
7016 Online
108795 Solutions
New Discussion юеВ

Re: file date/time

 
SOLVED
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?

Thanks!
2 REPLIES 2
James R. Ferguson
Acclaimed Contributor
Solution

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'.

Regards!

...JRF...
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!