Ctime

From Hackepedia
Revision as of 13:02, 28 October 2005 by Pbug (talk | contribs)
Jump to navigationJump to search

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

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

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