Linux Stat command View file information

Source: Internet
Author: User

In Linux, there is no concept of file creation time. Only the file access time, modification time, state change time. This means that you cannot know when the file was created. However, if the file has not been modified since it was created, the modification time = creation time, if the state has not changed since the creation of the file, then the state change time = creation time, and if the file has not been read since it was created, then the access time = creation time, this basic is not likely.

 Several times related to the file:

1, Access time, read the contents of this file, this time will be updated. For example, use the more command for this file. The LS, stat command does not modify the file access time.

2, modify the time, the contents of the file modification once, this time will be updated. For example: VI after saving files. The time that ls-l lists is this time.

3, state change time. Change the file properties once with the chmod command, and the time will be updated. To view the detailed status of the file, the exact modification time, etc., you can use the stat command file name.

For example: [[email protected] ~]# stat Install.log

Reference:

File: ' Install.log '
size:36591 blocks:80 IO block:4096 Regular file
device:803h/2051d inode:1703938 links:1
Access: (0644/-rw-r--r--) Uid: (0/root) Gid: (0/root)
Access:2014-11-15 04:15:16.140343482 +0800
modify:2014-11-06 18:15:01.929999668 +0800
change:2014-11-06 18:15:14.261999662 +0800

Description: Access time for access. Modify modification time. Change state changes time. Can stat * View the status of all files in this directory

Linux Stat command View file information

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.