Ctime: Difference between revisions
From Hackepedia
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
Time of last change of the [[inode]]. This time is taken from the [[inode]] itself. | Time of last change of the [[inode]]. This time is taken from the [[inode]] itself. | ||
$ stat -s [[variables|$ | $ stat -s [[variables|$file]] | tr ' ' '\n' | grep ctime | ||
st_ctime=1130490970 | st_ctime=1130490970 | ||
$ date -r 1130490970 | $ date -r 1130490970 | ||
Fri Oct 28 11:16:10 CEST 2005 | Fri Oct 28 11:16:10 CEST 2005 | ||
$ ls -lcT | $ ls -lcT $file | ||
-rw-r--r-- 1 root wheel 33554432 Oct 28 11:16:10 2005 | -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]]. | 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]]. |
Revision as of 13:02, 28 October 2005
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