doc: update find.md (#148)
This commit is contained in:
parent
2843f35c9a
commit
436e73a3a9
12
docs/find.md
12
docs/find.md
@ -196,11 +196,11 @@ $ find /home -user tecmint -iname "*.txt"
|
||||
### 多个文件名
|
||||
|
||||
```shell
|
||||
$ find . -type f \( -name "*.sh" -o -name "*.txt" \)
|
||||
$ find . -type f \( -name "*.sh" -or -name "*.txt" \)
|
||||
```
|
||||
<!--rehype:className=wrap-text -->
|
||||
|
||||
查找带有 `.sh` 和 `.txt` 扩展名的文件
|
||||
查找带有 `.sh` 或 `.txt` 扩展名的文件
|
||||
|
||||
### 多个目录
|
||||
|
||||
@ -388,3 +388,11 @@ $ find / -type d -perm 777 -print -exec chmod 755 {} \;
|
||||
$ find . -type f -name "*.java" | xargs tar cvf myfile.tar
|
||||
$ find . -type f -name "*.java" | xargs tar rvf myfile.tar
|
||||
```
|
||||
|
||||
### 查找并排除目录
|
||||
|
||||
查找当前目录及子目录中的所有`js`文件,但是排除掉`node_modules`目录中的
|
||||
|
||||
```shell
|
||||
$ find . -type f -name "*.js" -not -path "./node_modules/*"
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user