Linux system files have three main time attributes, CTime (change times), Atime (Access Time), Mtime (Modify)

Source: Internet
Author: User

CTime refers to the change time.

Mtime refers to modify time.

The difference between Mtime and CTime is that only if the contents of the file are modified, the mtime of the file will be updated, and the renaming of the file and the owner of the modified file will only update the CTime.

Example: MV operation of the file, mtime unchanged, CTime Update, edit the contents of the file, Mtime and CTime simultaneously modified. The effect of other operations can be tested by yourself. However, a touch operation on a file modifies both Mtime and CTime.

Atime, this is updated every time you view the contents of a file. such as cat operations, and LS operations are not updated.

You can use stat to see properties such as the mtime,ctime,atime of a file, or you can view it through the LS command, as follows:

LS-LC filename Lists the CTime of the file

Ls-lu filename Lists the atime of the file

ls-l filename Lists the mtime of the file




Linux system files have three main time attributes, CTime (change times), Atime (Access Time), Mtime (Modify)

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.