#find是在系統當中搜索符合條件的文件名。若是須要匹配,使用通配符匹配,通配符是徹底匹配。node
#避免大範圍搜索,會很是耗費系統資源linux
語法spa
find [搜索路徑] [參數]資源
經常使用參數file
-atime +n/-n:訪問或執行時間大於/小於n天的文件搜索
[root@ly-linux ~]# find /var/log/ -atime -10語法
-ctime +n/-n:最後一次寫入更改inode屬性的時間大於/小於n天的文件im
[root@ly-linux ~]# find /var/log/ -ctime -10
文件
-mtime +n/-n:寫入時間大於/小於n天的文件時間
[root@ly-linux ~]# find /var/log/ -ctime -10
-name filename:直接查找該文件名的文件
[root@ly-linux ~]# find /root/ -name install.log
-type filetype:經過文件類型查找(f,b,c,d,l,s等)
[root@ly-linux ~]# find /var/log/ -type f