Ctime

From Hackepedia
Revision as of 02:56, 28 October 2005 by Pbug (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Time of last change of the inode. This time is taken from the inode itself.

$ stat -s disk | tr ' ' '\n' | grep ctime
st_ctime=1130490970
$ date -r 1130490970
Fri Oct 28 11:16:10 CEST 2005
$ ls -lcT disk
-rw-r--r--  1 root  wheel  33554432 Oct 28 11:16:10 2005 disk

Usually when the mtime gets updated the ctime will be updated as well for example when the file size changes this has to be reflected in the inode.

The ctime is also a good place to check for new files written or updated in your system in the last few days (2 in this example)

$ find . -ctime -2 -print | wc -l
     38