Follow-up Comment #1, bug #52409 (project findutils): Actually, this is a usage error: -print is an action as well as a predicate. In particular, it takes effect when it is executed *in order* among the predicates. So if you execute
find . -name '*.c' -print find will, for each file name, first test to see if it passes the -name test, and then if it does, test to see if it passes the -print test. -print always succeeds, but as a side-effect, it prints the name. And consecutive predicates are implicitly connected by "and", or rather, the short-circuiting "&&" operator of C. If you execute find . -name '*.c' -print -print it will print every *.c name *twice*, as there are two -print predicates to execute. If you execute find . -name '*.c' it will print every *.c name once, because find appends -print to command lines that have no side-effect-causing predicates. If you execute find . -print -name '*.c" find will, for each name, first print it and then test if it matches *.c. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?52409> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/