- 论坛徽章:
- 20
|
知道答案了,因为:
The expression is made up of options (which affect overall operation rather than the processing of a specific file, and always return true),
tests (which return a true or false value), and actions (which have side effects and return a true or false value), all separated by operators.
-and is assumed where the operator is omitted.
If the expression contains no actions other than -prune, -print is performed on all files for which the expression is true.
所以:一下命令是等价的:
find ./ \( -name "databak" -prune \) -o -name "*20150408*" -type f
find ./ \( \( -name "databak" -a -prune \) -o \( -name '*20150408*' -a -type f \) \) -a -print
find ./ \( -name "databak" -prune -a -print \) -o -name "*20150408*" -type f -a -print
因此结果多了一个"./databak" |
|