Ctime

From Hackepedia
Revision as of 11:43, 28 October 2005 by Frankk (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_or_diskname | 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