Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> Linux技術

Linux 文件三個時間:atime、mtime、ctime

三種時間

atime 是訪問時間,讀取檔案內容會更新;mtime 是修改時間,檔案內容變更會更新;ctime 是狀態改變時間,權限或屬性變更會更新。

touch 操作

touch file 會把三個時間更新到目前。touch -a 只改 atime,touch -m 只改 mtime。stat 可查看詳細時間。

注意

atime 可能有緩存,不一定每次讀取都立即改變。ll --full-time 可查看完整時間。

ll 1.sh --full-time
Copyright © Linux教程網 All Rights Reserved