| 用途 | 剪枝跳过指定目录树 |
|---|---|
| 语法 | find ... -name 目标 -prune -o 其他条件 -print |
| 注意 | 必须配合 -o 与末尾 -print |
常用示例
常用示例
find /data -name node_modules -prune -o -type f -name '*.js' -print
find / -xdev -name .git -prune -o -name '*.pem' -print
find . -path './cache/*' -prune -o -type f -print