天天看点

linux系统中的三个time:atime、mtime、ctime

Linux文档的时间一般分三种:

Access time-atime(访问时间)

Modification time-mtime(内容修改时间)

change-ctime(inode更改时间)
           
ctime 是在写入文件、更改所有者、权限或链接设置时随 Inode 的内容更改而更改的。

atime 是在读取文件或者执行文件时更改的 

mtime 是在写入文件时随文件内容的更改而更改的。
           
查看三个时间的命令:

# ls -lc filename       列出文件的 ctime
# ls -lu filename       列出文件的 atime
# ls -l filename        列出文件的 mtime 
           
注:

(1)touch 会更改三个time
(2)cat 命令只修改atime
           

继续阅读