find.-name'*.log'find.-iname'*.jpg'find /var -type f -size +100M
find.-type d -name node_modules
find.-mtime-7find.-mmin-30find.-user nginx
find.-perm644find.-maxdepth2-type f
find.-type f -print0|xargs-0wc-lfind.-type f -execchmod644{} +
find.-name'*.tmp'-deletefind.-type f -newer reference.txt
条件速查
条件
含义
-name / -iname
名称/忽略大小写
-type f/d/l
文件/目录/链接
-size +10M
大于 10M
-mtime -7
7 天内修改
-mmin -30
30 分钟内修改
-user / -group
属主/属组
-perm
权限
-maxdepth
最大深度
-not / !
取反
-print0
NUL 分隔,安全处理空格
场景速查
目的
写法
排除目录
find . -path ./node_modules -prune -o -type f -print