Shell中find中的atime、ctime、mtime的区别

Shell中find中的atime、ctime、mtime的区别

find用法:


-atime n File was last accessed n*24 hours ago. 访问(读取文件或执行文件)

-ctime n File’s status was last changed n*24 hours ago. 写入修改 更改属主

-mtime n File’s data was last modified n*24 hours ago. 文件状态被修改

-amin n File was last accessed n minutes ago. 这是按分钟来算的一般不用

-cmin n File’s status was last changed n minutes ago.

关于+n还是-n:


+n for greater than n, #N天以外的,N天前的

-n for less than n #N天以内的

n for exactly n #正好的
# find . -ctime 6   表示刚好第6天
# find . -ctime +6  表示第6天以外
# find . -ctime -6  表示第6天以内
posted @ 2018-11-06 17:00  TBHacker  阅读(2184)  评论(0编辑  收藏  举报