1.1 Linux中的時間分爲三種
1.mtime(modify time) 修改時間,文件/目錄的修改時間,文件內容修改
2.ctime(change time) 改變時間,文件/目錄的屬性的變化,修改時間,大小,硬鏈接數,權限,所有者,所屬組,類型
3.atime(access time) 訪問時間,文件/或目錄的訪問時間,查看文件之後,內容沒變化之前再次訪問的話,訪問時間不變化
使用stat查看文件詳細信息
[root@qizhong tmp]# stat test.txt
File:`test.txt'
Size:0 Blocks: 0 IO Block:4096 regular empty file
Device: 803h/2051d Inode:398305 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2017-07-29 15:02:22.478435838 +0800 ##訪問時間
Modify: 2017-07-29 15:02:22.478435838 +0800 ##修改時間
Change: 2017-07-29 15:02:22.478435838 +0800 ##改變時間
[root@qizhong tmp]# echo 1 >test.txt
[root@qizhong tmp]# stat test.txt
File:`test.txt'
Size:2 Blocks: 8 IO Block:4096 regular file
Device: 803h/2051d Inode:398305 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2017-07-29 15:02:22.478435838 +0800
Modify: 2017-07-29 15:03:09.540436756 +0800
Change: 2017-07-29 15:03:09.540436756 +0800
[root@qizhong tmp]# cat test.txt
1
[root@qizhong tmp]# stat test.txt
File:`test.txt'
Size:2 Blocks: 8 IO Block:4096 regular file
Device: 803h/2051d Inode:398305 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2017-07-29 15:03:30.688435443 +0800
Modify: 2017-07-29 15:03:09.540436756 +0800
Change: 2017-07-29 15:03:09.540436756 +0800
[root@qizhong tmp]#
<>>新手,請多多指教<><><><><><><><><><><><<><><><><><><><><><><><>>