Linux - atime ctime mtime

文件的 Access time : atime 是在讀取文件或者執行文件時更改的。

文件的 Modified time : mtime 是在寫入文件時隨文件內容的更改而更改的。

文件的 Create time : ctime 是在寫入文件、更改所有者、許可權或鏈結設置時隨 Inode 的內容更改而更改的。

因此,更改文件的內容即會更改 mtime 和 ctime,
但是文件的 ctime 可能會在 mtime 未發生任何變化時更改 - 在許可權更改,但是文件內容沒有變化的情況下。


ls -lc filename 列出文件的 ctime

ls -lu filename 列出文件的 atime

ls -l filename 列出文件的 mtime

Comments