I'm trying to use the + option of find exec instead of xargs. However, I can't seem to get it to work. I feel I must be missing something obvious here.
Example:
find . -name "*.java" -exec grep "@author" {} + \;
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]
On the other hand, this works:
find . -name "*.java" -exec grep "@author" {} \;
as does this:
find . -name "*.java" | xargs grep "@author"