Update find.md

This commit is contained in:
clay-wangzhi 2021-06-17 14:59:04 +08:00 committed by 小弟调调™
parent 12c2dafd75
commit 59df69fb13
1 changed files with 10 additions and 0 deletions

View File

@ -329,6 +329,16 @@ find . -type f -name "*.txt" -exec printf "File: %s\n" {} \;
find . -path "./sk" -prune -o -name "*.txt" -print
```
> :warning: ./sk 不能写成 ./sk/ ,否则没有作用。
忽略两个目录
```shell
find . \( -path ./sk -o -path ./st \) -prune -o -name "*.txt" -print
```
> :warning: 如果写相对路径必须加上`./`
#### find其他技巧收集
要列出所有长度为零的文件