Difference between atime ctime and mtime

atime is when the file was last read “ls -la –time=atime”
ctime is the inode change time “ls -la –time=ctime”
mtime is the file modification time. “ls –lu”
Mtime changes when you write to the file. It is the age of the data in the file. Whenever mtime changes, so does ctime. But ctime changes metadata as well. For example, it will change if you change the owner or the permissions on the file or by renaming the file.
Unlike atime and mtime, ctime cannot be set with utime() as used by touch; the only way to set it to an arbitrary value is by changing the system clock.

No comments:

Post a Comment

Thank You for your Comments, We will read and response you soon...