Linux的文件系统通常包括change time,access time和modification time这3个时间标签。
st_atime
Time when file data was last accessed. Changed by the
following functions: creat(), mknod(), pipe(),
utime(2), and read(2).
st_mtime
Time when data was last modified. Changed by the fol-
lowing functions: creat(), mknod(), pipe(), utime(),
and write(2).
st_ctime
Time when file status was last changed. Changed by the
following functions: chmod(), chown(), creat(),
link(2), mknod(), pipe(), unlink(2), utime(), and
write().
在实际shell命令中,
- touch 影响 atime和mtime,可以通过选项开关选择;
- ls未加选项时,time一栏显示的是mtime;
- chmod,chown,chgrp影响ctime;
- 读写操作通常影响atime和mtime;
没有评论:
发表评论