Find command:atime, Mtime, CTime differences:Atime refers to access time, that is, when a file is read or executed, and the modification of a file does not change access times.CTime is the change time file state changes, refers to the file I node
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
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):
CTime is change timeAtime is Access timeMtime is modified timeChanging the contents of a file changes mtime and CTime, but the CTime of the file may change when the Mtime does not change – in the event that the permissions change, but the contents
The CTime () method is converted because the string representing the local time represents the time in seconds. If you do not set the seconds or none, the current time () of the returned times is used. Use Asctime (localtime (secs)). Zone
Anyone who has studied Linux or has a certain understanding of Linux knows that Linux system files have three main time attributes, Atime (access times), CTime (change), Mtime. Many beginners or textbooks will write CTime as create time, which will
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)
1. Type Clock_t: it is a long type, used to record the number of clock timing units in a period of time, that is, the CPU running unit time.Size_t: defined in the Standard C library. It should be an unsigned int and a long unsigned int in a 64-bit
Mtime:modification timeWhen the "content data" of this file is changed, update the time! "Content data" means the contents of an archive, not attributes or permissionsExample: View Man.config's mtime, found to be 2006-07-13[Email protected] ~]# ls-l/
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
Let's start with a brief look at the concept of Linux timestamp atime CTime mtimeAtime:access time when the file (read or execute) or directory was last accessedMtime:modofy time when the file (content) or directory (content) was last
Linux uses Ctime/mtime/atime to mark document time,CTIME:C does not represent create but the change meaning, such as the modification of the contents of the file changes will be changed CTimeMtime:m is modify meaning, and ctime the only difference
The Linux system has three important file times.respectively: Ctime,atime,mtime.1.ctime (change time) is written to a file that changes with the owner, permission, and so on, that is, when the state of the file was last changed. (Index node change)2.
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
You can use the ctime class to conveniently obtain the current system time and convert it to various formats.
TheFormatArgument consists of one or more codes; as inPrintf, The formatting codes are preceded by a percent sign (%). Characters
Article Title: atime, mtime, and ctime of files in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Cstring, char *, String, Int, _ bstr_t, ctime, and coledatetime are converted to each other to determine whether a string is a floating point number.
# Include
Using namespace STD;# Include
{Cstring strcstring = "ABC ";Char strchar [256], *
St_atimeTime when file data was last accessed. changed byFollowing functions: creat (), mknod (), pipe (),Utime (2), and read (2 ).St_mtimeTime when data was last modified. changed by the fol-Lowing functions: creat (), mknod (), pipe (), utime
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.