Linux stat to view the File Creation Time

Source: Internet
Author: User

In Linux, there is no concept of File Creation Time. Only the file access time, modification time, and state change time are allowed. That is to say, you cannot know the file creation time. However, if the file has not been modified after it is created, the modification time is equal to the creation time. If the status of the file has not changed after it is created, the state change time is equal to the creation time, if it has not been read, the access time is equal to the creation time, which is basically impossible.
File-related time:
1. Access time: Read the content of this file once, and the time will be updated. For example, use the more command for this file. The LS and stat commands do not modify the file access time.
2. modification time: Modify the file content once. This time will be updated. For example, save the file after Vi. The time listed by LS-L is this time.
3. Status change time. Use the CHMOD command to change the file attributes once. This time will be updated. You can use the STAT command to view the detailed status of a file and the exact modification time.

For example
[Jing @ zhw.c] $ stat temp. c
File: 'temp. c'
Size: 66 blocks: 8 Io block: 4096/u4e00/u822c/u6587/u4ef6
Device: 807 H/2055d inode: 1191481 links: 1
Access: (0664/-RW-r --) uid: (500/Jing) gid: (500/Jing)
Access: 20:19:45. 000000000 0800
Modify: 2008-03-12 20:19:45. 000000000 0800
Change: 2008-03-12 20:19:45. 000000000 0800
Description: Access time. Modify modification time. Change status change time.

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.