ctime, atime, and mtime

It is important to distinguish between a file or directory’s change time (ctime), access time (atime), and modify time (mtime).

ctime — In UNIX, it is not possible to tell the actual creation time of a file. The ctime–change time–is the time when changes were made to the file or directory’s inode (owner, permissions, etc.). It is needed by the dump command to determine if the file needs to be backed up. You can view the ctime with the ls -lc command.
atime — The atime–access time–is the time when the data of a file was last accessed. Displaying the contents of a file or executing a shell script will update a file’s atime, for example. You can view the atime with the ls -lu command.
mtime — The mtime–modify time–is the time when the actual contents of a file was last modified. This is the time displayed in a long directory listing (ls -l).

No Comments

Leave a Reply

Your email is never shared.Required fields are marked *

To submit your comment, click the image below where it asks you to...
Clickcha - The One-Click Captcha