atime 是訪問時間,讀取檔案內容會更新;mtime 是修改時間,檔案內容變更會更新;ctime 是狀態改變時間,權限或屬性變更會更新。
touch file 會把三個時間更新到目前。touch -a 只改 atime,touch -m 只改 mtime。stat 可查看詳細時間。
atime 可能有緩存,不一定每次讀取都立即改變。ll --full-time 可查看完整時間。
ll 1.sh --full-time
Linux 檔案的 Atime、Mtime、Ctime 是什麼?
Linux中的atime、mtime與ctime到底有什麼不同
Linux 的 atime、mtime 與 ctime 差在哪
Linux 的三個時間戳:atime、mtime、ctime 一次說清
Linux 檔案的三個時間:Atime、Mtime、Ctime 有什麼不同
find 指令進階用法全解析,順便弄懂 atime、ctime、mtime 的差別
Linux 檔案的三個時間戳:ctime、mtime、atime 差異
搞懂 atime、ctime、mtime 的差別,以及 find -mtime 的 n