Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The stat command's manual page says:

   %x     Time of last access
   %y     Time of last modification
   %z     Time of last change

I am unable to understand what is the difference between modify and change. What I understand both are synonyms (English is not my mother tongue), but their output is different.

I tried following command

 stat --printf="Change %z\nAccess %x\nModify %y\n" p.txt

Now when I open p.txt, access time is changed, I go into insert mode, edit the file, modify and change time remains same.

Change 2010-10-06 12:48:39.286252389 +0500
Access 2010-10-06 12:49:14.962243456 +0500
Modify 2010-10-06 12:48:39.234498878 +0500

When I write the changes to file :w, modify and change, both change but give different values.

Change 2010-10-06 12:51:21.949082169 +0500
Access 2010-10-06 12:51:21.908246082 +0500
Modify 2010-10-06 12:51:21.908246082 +0500

So what is the meaning of modify and change in this context? Time of modification and change give time of which event?

share|improve this question
To make it even funnier, in my localized --help it reads something like "last modify" and "last modified" since we don't have two words for modify/change. – Camilo Martin Jul 27 '12 at 15:21
up vote 52 down vote accepted

This has already been answered in this question, which I quote (original text by echox):

There are 3 kind of "timestamps":

  • Access - the last time the file was read
  • Modify - the last time the file was modified (content has been modified)
  • Change - the last time meta data of the file was changed (e.g. permissions)

This post on StackOverflow explains the difference among the three different times from a programming interface point of view.

share|improve this answer
Imho Access is the last time the file was "open for writing", or "open with write permission". In C this could be fopen(file, "r+") – LatinSuD Aug 20 '14 at 9:51
@LatinSuD access time is updated every time a file is opened, not just for writing but also for reading: see the POSIX standard and Wikipedia – Riccardo Murri Aug 20 '14 at 13:12
I just saw a concept called relatime. I modern kernels (2.6.30) atime is not always updated. This is very interesting on this respect: superuser.com/questions/464290/… – LatinSuD Aug 20 '14 at 15:38


ctime is the inode or file change time. The ctime gets updated when the file attributes are changed, like changing the owner, changing the permission or moving the file to an other filesystem but will also be updated when you modify a file.


mtime is the file modify time. The mtime gets updated when you modify a file. Whenever you update content of a file or save a file the mtime gets updated.

Most of the times ctime and mtime will be the same, unless only the file attributes are updated. In that case only the ctime gets updated.


atime is the file access time. The atime gets updated when you open a file but also when a file is used for other operations like grep, sort, cat, head, tail and so on.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.