Even though the timestamps are filesystems specific implementation, following are the main timestamps which all Linux filesystems have.
ctime(change time) is the time when changes made to the file’s inode (owner, permissions, etc.). The ctime is also updated when the contents of a file change. You can view the ctime with 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
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 (
For more clarity on timestamps:
cat file # file's atime is updated
chmod 755 file # file's ctime is updated
echo "new contents" >> file # file's ctime and mtime are updated
vi file # if you add/delete some lines ctime and mtime will get updated
Following are the system calls for retrieving information about a file
These system calls differ only in the way that file is passed.
stat() returns information about the named file.
lstat() is also doing the same but if the named file is a link, the information about the link itself will return rather than the file to which the link points.
fstat() returns information about a file referred to by an open file descriptor.
The ext4 filesystem have implemented few more timestamps which are following:
dtime– deletion time
crtime– creation time
You can read more about ext4 timestamps in following link: