5

Why does find's -exec only executes on one result?

view full story
linux-howto

http://unix.stackexchange.com – Here's what I checked: find mydir -maxdepth 2 -name .project -or -name .classpath gives output: mydir/.project mydir/.classpath Meanwhile find mydir -maxdepth 2 -name .project -or -name .classpath -exec echo {} \; gives output: mydir/.classpath so only 1 found item is listed, why? xargs works as expected: find mydir -maxdepth 2 -name .project -or -name .classpath | xargs -I {} echo {}; prints: mydir/.project mydir/.classpath Am I missing something about -exec? (HowTos)