CTime, Atime, mtime relations

Source: Internet
Author: User

It is important to differentiate between a file or a directory's change Time (time,ctime), Access time (Access Time,atime), and the modified time (modify Time,mtime).

ctime--in Unix, it is not possible to know the exact creation time of a file. Change Time (CTime) refers to the time when a file or directory's properties (owner, permissions, and so on) have been changed. CTime also changes when the contents of a file change. If a file needs to be backed up, the dump command needs to be ctime. You can use the LS-LC command to view CTime.

atime--access Time (atime) is the time at which a file's data was last accessed. For example, displaying the contents of a file or running a shell script updates the file's atime. You can use the Ls-lu command to view.

mtime--modification Time (mtime) is the time at which the current content of the file was last modified. This is the time displayed in a long list of directories.

In Linux, the status command is displayed 3 times.  Example: The atime of the cat file file will be updated.  $ chmod g+w file CTime will be updated. $ echo "File contents" > File CTime and Mtime will be updated.

CTime, Atime, mtime relations

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.