- 论坛徽章:
- 2
|
回复 6# aaa103439 - find {exp1} -o {exp2}
- [root@vhost1 a]# find . -path './b' -prune -o -type f #
- ./b # {exp1}
- ./c/c # {exp2}
- ./a # {exp2}
- [root@vhost1 a]# find . -path './b' -prune -o -print # when exp1 returns true, -print would not be exec.
- . # {exp2}
- ./d # {exp2}
- ./c # {exp2}
- ./c/c # {exp2}
- ./a # {exp2}
- [root@vhost1 a]# find . -path './e' -prune -o -type f # exp1 always return false, so lists all the file
- ./b/b # {exp1}
- ./c/c # {exp2}
- ./a # {exp2}
- [root@vhost1 a]# find . -path './b' -prune -o -type f -print # it will list all the file, except for the ones in the directory './b'
- ./c/c
- ./a
复制代码 |
|