Atime, Mtime, CTime, called the timestamp of the file, is one of seven of the file's meta-information, which is included in the inode. whichAtime (Accesstime) refers to the time when the file was last accessed;Mtime (Modifytime) refers to the time
A. Linux file time InformationFiles or folders in all UNIX file systems have three timestamps, atime, CTime, and Mtime, respectively.
Atime indicates the time of the last access (only access, no changes) to the file;
Mtime indicates the
Simulation Scenario:In a directory, there are a large number of files generated in different days, and the name of the file does not have a date identification, how to divide the files by date into different folders.According to the date the file
First, you can use the STAT command to query the inode information of a file, including ctime atime mtime.
1. easy understanding of files:
The access time of the file. atime is any access to inode that is changed when the file is read or
There are often cases where the file's time attribute is used, and there are three file-related time attributes under Linux. Atime,ctime,mtime. I also often confused, each encounter will be human flesh search, leisure time to prepare this knowledge
# #mtime/ctime/atime ParsingMtime--modify Time# #只有修改文件内容才会改变mtime时间. Modifying the contents of a file will also change the CTimeCTime--change Time# #改变时间, as long as you modify the contents of the file, the file name, the attributes (owner, group,
Atime:access time Last visitedMtime:modify time Last modified (refers to modified file contents, data content)Ctime:change time Last property change, inode node information modified (size, group, owner, permissions)Touch, chmod, Chown will change
In the Linux operating system, each file has a lot of time parameters, of which three are compared to the main, respectively, Ctime,atime,mtimeAtime last access time, such as LS, more etc, but chmod, chown, LS, stat, etc. will not be modified for
Read a lot of articles are basically reproduced the party's works to review all the information and hands-on test on the basis of a brief summaryYou can first use the STAT command to query the file's inode information, including CTime Atime mtime1.
-Atime, Mtime, CTime in LinuxI. atime, Mtime, CTime in the document1. Meaning and display method of various event markersatime: The last time the file was accessed was atime with the LS -lu Viewmtime: Last file content modification time, with LS -l
Linux, the file has its own atime, Mtime, CTime, under different commands, each time the corresponding changes. Let's take a brief look at the following:Atime (accesstime): Indicates when the file or directory was last accessed. Mtime (medifytime):
When you use the Mtime parameter in the Find command, you will see the official explanation as follows:
-mtime NFile ' s data is last modified n*24 hours ago. The comments For-atime to understand how rounding affects the
Interpretation of the file
View man Help:Find-search for files in a directory hierarchy ( [' harɑk] hierarchy, Hierarchy )Search for files in the directory hierarchyThere are two more plausible explanations in the man Help:
-atime N
File was last accessed n*24
Read a lot of articles are reproduced in the party's works and then review all the information and hands-on test on the basis of a brief summary of the first you can use the Stat command to query the file inode information, including CTime atime
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.
Use the touch command alone to update the file's Atime, CTime, mtime for the moment[Email protected] ~]# Stat profileFile: "Profile"size:1796 blocks:8 IO block:4096 Normal filedevice:803h/2051d inode:528818 links:1Access: (0644/-rw-r--r--) Uid:
Three time parameters for a file under Linux(1) Modification Time (mtime): Content modifiedThe modification time here refers to the content of the text changes, and the time of the update.Eg: Save the file after VI. (2) Status Time (CTime): status
3 time in linux atime; mtime; ctime introduction, atimemtime
The stat command can view detailed information about the file.
Atime indicates the last access time of the file (change cat, head, more, less, tail when viewing the command in the file)
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.