What is the difference between UNIX Access, Modify, and Change Times?

This is a silly little thing that I consistently forget … or at least forget some of the subtle differences between these three measures.

Here are the definitions of the different UNIX time information on a file with how they are typically referred to in man pages and the option to list the particular time with the ls command.

Access Time | atime | -ult
This is the time that the file was last accessed, read or written to.
Modify Time | mtime | -lt
This is the last time the actual contents of the file were last modified.
Change Time | ctime | -cl
This is the time that the inode information (permissions, name, etc., the metadata, as it were) was last modified.

  7 Responses to “UNIX Access, Modify, and Change Times”

  1. Hello. Your site displays incorrectly in Explorer, but content excellent! Thanks for your wise words:)

  2. mtime and ctime should be vice versa, see “man 2 stat”

  3. Access time doesn’t change when the file contents are written to, but both modify and change times do.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

   
© 2012 rootsmith blog Suffusion theme by Sayontan Sinha