Linux time stamp

Source: Internet
Author: User

There are 3 time definitions for each file in the Linux system (called Timestamp timestamps), which are three times

: Access time (atime), Modify Time (mtime), change Time (CTime), for these 3 times

is easy to confuse, here is briefly explained below:

Access times (atime): Refers to the use of files, so-called access,
Common actions are: Use the editor to view the contents of the file, use the Cat command to display the contents of the file, use the CP command to copy the

piece (i.e. the source file) to another file, or use the

Grep;sed;more;less;tail;head , and so on, any operation that reads without modifying the file will change the file's

Access time.

Modify Time (Mtime): Refers to when the file content is modified, as long as the contents of the file changes will change the file

Modify time,
Common use cases: (such as using a steering output or turning to attach) or disk operations, usually when we use ls–l

To see the file, it is displayed in Modify times

Change (ctime ): Refers to the time of file attributes or file location changes, such as using the CHMOD,CHOWN,MV Directive

Set to make a hard connection to a file using ln, which changes the file's change times.

Special Description:

If you modify the file (save using the editor or use it) >> turn the operation), modify time and change times
will synchronize the update to write, but access does not change.
If you perform a touch file, all 3 changes
use Ln–s to make a soft link to the file, which will change the file's fetch time
use Ls–la to view the generic file and not change these three times, but if the file is a symbolic link file, it will

Change the time taken (access times)

Linux timestamp

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.