Three time attributes of linux files

Source: Internet
Author: User
Linux files have three time attributes in windows. a file has three time attributes: creation time, modification time, and access time. In Linux, a file has three time attributes: access time, modification time, and status modification time. Www.2cto.com is different from each other. The three time attributes of the L... linux file are in windows. a file has three time attributes: creation time, modification time, and access time. In Linux, a file has three time attributes: access time, modification time, and status modification time. There is a difference between www.2cto.com and www.2cto.com. in Linux, there is no concept of creation time, that is, the file creation time cannot be known, but if the file has not been modified after it is created, the modification time = creation time; if the state of the object has not been changed after the object is created, the state change time is set to the creation time. if the object has not been read after the object is created, the access time is set to the creation time, it is difficult to determine whether a file has been changed, read, or changed its status. Therefore, it is basically impossible to determine the file creation time. The three time attributes of linux files are:
Atime, short for access time, displays the time when the data in the file is last accessed, for example, directly used by the system process or indirectly used by some commands and scripts. (Execute some executable files and scripts) mtime, short for modify time, displays the last time when the file content is changed, for example, it will change when editing with vi. (Block content) ctime, short for change time, displays the time when the file permission, owner, group, and number of links change. Of course, when the content changes, it also changes. (That is, when the Inode content is changed and the Block content is changed) the following three commands are used to view files: 1 ls command ls-lc filename list ctimels-lu filename of the file list of the atimels-l filename list of the file mtime www.2cto.com field description example ls (-l) st_atime file data last access time read-ust_mtime file data last modification time write default st_ctime file data last change time chown, chmod-c 2 use the stat command to view the three time options of the file: $ stat temp. sh File: "temp. sh "Size: 62 Blocks: 8 IO Block: 4096 general file Device: fd00h/64768d Inode: 624522 Links: 1 Access: (0664/-rw-r --) Uid: (500/signjing) Gid: (500/signjing) Access: 22:23:15. 000000000 + 0800 Modify: 22:21:23. 000000000 + 0800 Change: 22:22:38. signjing, author: 000000000 + 0800
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.