[QUOTE=Rohit_4739;4879595]
Code:
find / -xdev -path '/lib64' -prune -o -type f -size +5M
/etc/test1
/etc/test2
/etc/test3
/etc/test4
/lib/test5
/lib64
In that expression, "-prune" will be TRUE for the directory "/lib64", and therefore the entire expression is TRUE and you get the default action of "-print".
Code:
find / -xdev -path '/lib64' -prune -o -type f -size +5M -print
This expression
does contain an action other than "-prune", and your explicit "-print" will only occur when the second term of the expression is matched.
It becomes clearer if you add the implied parentheses:
Code:
find / -xdev \( -path '/lib64' -prune \) -o \( -type f -size +5M -print \)
Quote:
2. If print is anyway the default action then why to specify it explicitly ?
|
See above.