linux中的時間分爲那些?

1.1    Linux中的時間分爲三種

1.mtimemodify time   修改時間,文件/目錄的修改時間,文件內容修改

2.ctimechange time     改變時間,文件/目錄的屬性的變化,修改時間,大小,硬鏈接數,權限,所有者,所屬組,類型

3.atimeaccess 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]#




<>>新手,請多多指教<><><><><><><><><><><><<><><><><><><><><><><><>>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章