#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