Why updating atime doesn't update ctime?

Hi,

ctime is the inode change time. If reading a file, its atime will be updated, which should cause inode member i_atime changed, which is an inode change. So ctime should also be updated. But if I try to ls a directory on redhat, only the directory atime gets updated, not ctime. Why?

THANKS!

inodes are data about a file in a given filesystem. What is stored in an inode is system dependent, there is no standard.

POSIX compliant systems specifically update ctime (where ever it is kept) only with a change involving:

  1. file creation
  2. file permissions
  3. acl changes
    Otherwise ctime would have no meaning because it would be identical to atime. Every read access would update the file status time as well as the access time

Check out the utime() call on your system, or google for 'opengroup.org: utime'. utime() does update ctime.

1) what you just said about 'atime/read' would also apply to 'mtime/write' ;

2) if you consider "inode"-change meaning "owner/group/mode"-change, then the results shall match the text better, don't you think ?

and please (for the sake of goodness) consider that the 'original' description you mentioned was written about 3 decades ago, and was not 'revised' ever since ;

hth

good luck, and success.
alexandre botao