..MindWrite..

Posts Tagged ‘mtime’

Unix mtime, ctime, atime

Posted by guptaradhesh on November 1, 2010

ctime: is the inode change time. When does the inode change, when you of course update a file, but also when you do things like changing the permissions of the file but not necessarily its contents. We can view the ctime with the ls -lc command.

atime: stands for access time which is when the file was last read. Displaying the contents of a file or executing a shell script will update a file’s atime. We can view the atime with the ls -lu command.

mtime: is the modification time, so if you change the contents of the file, this time is updated. Keep in mind when you change the contents of a file and and save it, the inode gets updated as well for that file, so ctime always changes too. We can view this with ls -l.

Therefore, when mtime changes, ctime will always change.

Advertisements

Posted in tech, unix | Tagged: , , , , | Leave a Comment »