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

Shell中find中的atimectimemtime的区别

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天以内

Published by

风君子

独自遨游何稽首 揭天掀地慰生平

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注