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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM