Linux files have three time attributes: 1) mtime: The last modification time of the file content; 2) ctime: the time when the file status changes, such as permission and attribute changes. 3) atime: the time when the file content is accessed, such as cat and less. by default, ls displays the mtime of the file, that is, the file
Linux files have three time attributes:
1) mtime: The last modification time of the file content
2) ctime: the time when the file status changes, such as permission and attribute changes.
3) atime: the time when the file content is accessed, such as cat and less.
By default, ls displays the mtime of the file, that is, the last modification time of the file content. if you need to view the other two times, you can add the -- time parameter, as shown below:
# Ls-l/etc/man. config-rw-r --. 1 root 4940 Feb 22 2013/etc/man. config # ls-l -- time ctime/etc/man. config-rw-r --. 1 root 4940 Nov 5 20:14/etc/man. config # ls-l -- time atime/etc/man. config-rw-r --. 1 root 4940 Dec 20/etc/man. config
The touch Command can modify the file Time. its usage is as follows:
If no date is specified, the default value is the system date touch-d file touch-d "" file touch-d "pm". if no time is specified for file, the default value is 00: 00: 00 touch-d 20000506 file touch-d "05/06/2000" file touch-d "20000506" filetouch-d "pm 05/06/2000" file touch-d "20000506" file touch-d" 20000506 18:03:00 "file