difference between "-o" and "-prune -o" ?
Hi all, Here are two simple tests: Code:
find . -name "*.txt" -o -print Code:
find . -name "*.txt" -prune -o -print But what is the difference between them? Thanks. |
The main difference is that -o is a logical operator and -prune is an action. The output is the same because of the rule "if the expression contains no actions other than -prune, -print is performed on all files for which the expression is true". For a detailed explanation of the -prune usage, you can check this post of mine some time ago.
|
All times are GMT -5. The time now is 09:47 AM. |