Linux stat (three time attribute commands can be used to list the atime, CTime, and Mtime of a file. )

Source: Internet
Author: User

[[Email protected] ~]# stat test/test2 File: ' test/test2 ' size:0 blocks:0 IO block:4096 Plain Empty text Pieces device:803h/2051d inode:261657 links:1 Access: (0744/-rwxr--r--) Uid: (500/user1) Gid: (500/TESTG roup) access:2013-05-10 09:00:36.092000531 +0800 modify:2013-05-10 09:00:36.092000531 +0800 change:2013-05-10 09:30:58 .788996594 +0800

Atime does not necessarily have to be modified after accessing the file, because: when using the Ext3 file system, the Atime information is not updated if the Noatime parameter is used on Mount. In short, these three time stamp are placed in the inode. If the mtime, atime modify the inode will be changed, since the inode changed, that CTime also followed to change.

Amin continue ' find ' common options:

'-name filename ' directly finds the file name of the file, this option is used a lot.

[[email protected] ~]# find. -name Test2./test/test2./test2

'-type filetype ' is found by file type. The file type has been briefly described in the previous section, and I believe you have understood it in general. FileType contains F, B, C, D, L, S, and so on.

[Email protected] ~]# find/tmp/-type d/tmp//tmp/. Ice-unix/tmp/test[[email protected] ~]# find/tmp/-type f/tmp/yum.log/tmp/.bash_history/tmp/ip.txt


Stat suffix file access time modify; Create or change time change metadata time date look time


This article is from "Linux rookie" blog, please be sure to keep this source http://490617581.blog.51cto.com/11186315/1757781

Linux stat (three time attribute commands can be used to list the atime, CTime, and Mtime of a file. )

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.