The Linux file has three time attributes:
1) Mtime: file content Last modified time
2) CTime: File state changed time, such as permissions, properties were changed
3) Atime: File content is accessed time, such as cat,less, etc.
By default, LS displays the mtime of the file, which is the last time the file content was modified, and if you need to see the other two times, you can add the--time parameter as follows:
# ls-l/etc/man.config
-rw-r--r--. 1 root 4940 Feb 2013/etc/man.config
# ls-l--time Ctime/etc/man . config
-rw-r--r--. 1 root root 4940 Nov 5 20:14/etc/man.config
# ls-l--time atime/etc/man.config
-rw- R--r--. 1 root 4940 Dec 03:50/etc/man.config
The touch command can modify the time of the file, and its usage is as follows:
If no date is specified, the default is the system date
touch-d 18:03 file
touch-d "18:03" file
touch-d "6:03pm" file
if no time is specified, the default is 00:00:00
touch-d 20000506 file
touch-d "05/06/2000" file touch-d "
20000506" file
touch-d "6:03pm 0 5/06/2000 "File
touch-d" 20000506 18:03 "file
touch-d" 20000506 18:03:00 "file
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/