Read a lot of articles are basically reproduced the party's works to review all the information and hands-on test on the basis of a brief summary
You can first use the STAT command to query the file's inode information, including CTime Atime mtime
1. Easy to understand documents:
A file's access Time,atime is a change to any inode access that changes when the file is read or executed.
The Modified time,mtime of a file is changed when the file is written with changes to the contents of the file.
The change time,ctime of a file is changed as the content of the Inode changes when you write to the file, change the owner, permissions, or link settings. As long as the content of the stat is changed, changes will occur. Changes in Mtime inevitably lead to ctime changes.
2. Folder:
The folder's access Time,atime is changed when the file is read or executed (we only CD into a directory and then CD: will not cause atime changes, but LS a bit different).
The folder's Modified Time,mtime is a new file in the folder, * * * will change (if you just change the contents of the file will not cause mtime changes, in other words if the results of ls-f <directory> changes mtime will be refreshed. There may be someone to argue: I enter DD This folder vi a file and then exit, Ls-f <directory> before and after the results have not changed but the folder Mtime changed ... This is a good idea. The VI command creates a ". File.swp" temporary file in this folder when editing a file, and the file is * * * * * with the exit of VI ... This leads to a change in mtime [auxten:p] You can experiment with nano-modified files.
The change time,ctime of the folder is basically the same as the file's CTime, which embodies the change time of the inode.
One more thing to add: Mount-o noatime (mount-o remount,atime/can re-mount the root directory online) can choose not to log the file atime changes, what does that mean? When you create this file, the atime of the file is fixed, unless you use touch or touch-a to force the atime of the file to be refreshed. This can improve the read and write performance of the file system to a certain extent, especially the Web site in this system in Fstab add Noatime is a good idea O (∩_∩) o
Like my/dev/sda3/ext3 noatime 0 1
This article is from the "Reboot DevOps Development" blog, please be sure to keep this source http://opsdev.blog.51cto.com/2180875/1560527
The meaning of CTime atime mtime under Linux