1, three kinds of time correspondence relation table
Column Column column
Accessing Time Access Atime
Modification Time Modify Mtime
State Change time Changes CTime
2. How to view three timestamp of file file
Stat filename
3, three kinds of time stamp explanation
Access time: Read the contents of the file once, this time will be updated. such as more, cat and other commands. LS, stat command does not modify Atime
Modification time: The modified time is the last time the file content was modified. For example: Save the file after vim operation. This is the time ls-l listed.
[Email protected] ~]# stat oldboy.txt
File: ' Oldboy.txt '
size:69 blocks:8 IO block:4096 Regular file
device:803h/2051d inode:130137 links:1
Access: (0644/-rw-r--r--) Uid: (0/root) Gid: (0/root)
access:2017-11-11 08:33:41.661983311 +0800
modify:2017-11-11 08:32:43.505972876 +0800
change:2017-11-11 08:32:43.505972876 +0800
[Email protected] ~]# >oldboy.txt
[Email protected] ~]# stat oldboy.txt
File: ' Oldboy.txt '
size:0 blocks:0 IO block:4096 Regular empty file
device:803h/2051d inode:130137 links:1
Access: (0644/-rw-r--r--) Uid: (0/root) Gid: (0/root)
access:2017-11-11 08:33:41.661983311 +0800
modify:2017-11-11 21:01:21.249962087 +0800
change:2017-11-11 21:01:21.249962087 +0800
State change time. Is the time that the Inode node of the file was last modified, and the file properties are modified by the chmod, Chown command, and the time is updated.
[Email protected] ~]# stat oldboy.txt
File: ' Oldboy.txt '
size:0 blocks:0 IO block:4096 Regular empty file
device:803h/2051d inode:130137 links:1
Access: (0644/-rw-r--r--) Uid: (0/root) Gid: (0/root)
access:2017-11-11 08:33:41.661983311 +0800
modify:2017-11-11 21:01:21.249962087 +0800
change:2017-11-11 21:01:21.249962087 +0800
[Email protected] ~]#
[email protected] ~]# ll Oldboy.txt
-rw-r--r--1 root root 0 Nov 21:01 oldboy.txt
[Email protected] ~]# LN oldboy.txt oldboy.txt-hard
[email protected] ~]# ll Oldboy.txt
-rw-r--r--2 root root 0 Nov 21:01 oldboy.txt
[Email protected] ~]# stat oldboy.txt
File: ' Oldboy.txt '
size:0 blocks:0 IO block:4096 Regular empty file
device:803h/2051d inode:130137 Links:2
Access: (0644/-rw-r--r--) Uid: (0/root) Gid: (0/root)
access:2017-11-11 08:33:41.661983311 +0800
modify:2017-11-11 21:01:21.249962087 +0800
change:2017-11-11 21:03:09.906964526 +0800
1) mtime file content last modified on 2) CTime file status last changed 3) atime file content last access time exercises:
1. How do I check the timestamp in Linux?
2. Time stamp classification (three types)
Three kinds of timestamps in Linux basic learning -9.7-linux