Atim, Mtime, CTime in Linux

Source: Internet
Author: User

-

Atime, Mtime, CTime in Linux

I. atime, Mtime, CTime in the document

1. Meaning and display method of various event markers

atime: The last time the file was accessed was atime with the LS -lu View

mtime: Last file content modification time, with LS -l see time as Mtime

CTime Last file property modification time, with LS -LC to see the time is CTime

2, using stat command to view the time information for a file   as follows:

[Email protected]:~# stat/root/file
File: '/root/file '
size:1490 blocks:8 IO block:4096 Regular file
device:801h/2049dinode:262284 links:1
Access: (0644/-rw-r--r--) Uid: (0/root) Gid: (0/root)
Access: 2016-05-16 05:09:12.390288179-0700//atime
Modify: 2016-05-16 05:08:09.454285206-0700//mtime
Change: 2016-05-16 05:08:09.454285206-0700//ctime
Birth:-

3. change the file or directory time command touch

Parameter description

-A: Modify atime

-M: Modify mtime

-C: Only the time to modify the file (three time changes together), if the file does not exist do not create a new file

Ii. atime, Mtime, CTime in the folder

The atime of a folder is changed when the file is read or executed (we only CD into a directory and then CD: will not cause atime changes, but ls will change atime).

< Span lang= "en-us" xml:lang= "en-US" >mtime   is a file in the folder to create new, delete will change (if you just change the contents of the file will not cause mtime changes)

the CTime of the folder is basically the same as the file ctime

--

Atim, Mtime, CTime

in Linux

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.