linux下面的三种时间
命令 | 全程 | 说明 |
---|---|---|
mitme | modify time | 修改时间(文件内容变化,修改文件保存以后) |
ctime | change time | 属性改变的时间(文件属性、大小、变化、类型、inode、权限、所有者用户组、硬链接数量) |
atime | access time | 访问时间(cat) |
-c with -lt: sort by, and show, ctime (time of last modification of
file status information); with -l: show ctime and sort by name;
otherwise: sort by ctime, newest first
-u with -lt: sort by, and show, access time; with -l: show access
time and sort by name; otherwise: sort by access time
ctime
[root@shell ~ 141]# ls -cl
total 8
-rw-r--r--. 1 root root 1031 Aug 4 11:56 2.txt
lrwxrwxrwx. 1 root root 5 Aug 4 00:49 3.txt -> 1.txt
-rw-------. 1 root root 1264 Jul 22 15:19 anaconda-ks.cfg
drwxr-xr-x. 2 root root 61 Aug 4 12:58 test
-rw-rw----. 1 root root 0 Aug 4 11:02 zheng
-rw-r--r--. 1 root root 0 Aug 4 12:52 zheng.c
-rw-r--r--. 1 root root 0 Aug 4 12:52 zheng.sh
-rw-r--r--. 1 root root 0 Aug 4 12:52 zheng.txt
atime
[root@shell ~ 142]# ls -ul
total 8
-rw-r--r--. 1 root root 1031 Aug 3 23:43 2.txt
lrwxrwxrwx. 1 root root 5 Aug 4 00:49 3.txt -> 1.txt
-rw-------. 1 root root 1264 Jul 22 15:19 anaconda-ks.cfg
drwxr-xr-x. 2 root root 61 Aug 4 12:57 test
-rw-rw----. 1 root root 0 Aug 4 11:02 zheng
-rw-r--r--. 1 root root 0 Aug 4 12:52 zheng.c
-rw-r--r--. 1 root root 0 Aug 4 12:52 zheng.sh
-rw-r--r--. 1 root root 0 Aug 4 12:52 zheng.txt
mtime
[root@shell ~ 143]# ls -l
total 8
-rw-r--r--. 1 root root 1031 Aug 4 11:56 2.txt
lrwxrwxrwx. 1 root root 5 Aug 4 00:49 3.txt -> 1.txt
-rw-------. 1 root root 1264 Jul 22 15:19 anaconda-ks.cfg
drwxr-xr-x. 2 root root 61 Aug 4 12:58 test
-rw-rw----. 1 root root 0 Aug 4 11:02 zheng
-rw-r--r--. 1 root root 0 Aug 4 12:52 zheng.c
-rw-r--r--. 1 root root 0 Aug 4 12:52 zheng.sh
-rw-r--r--. 1 root root 0 Aug 4 12:52 zheng.txt