Quote:
Originally Posted by Dbecker
It was pointed out to me that the exec flag in find is much safer
/usr/local/bin/find /tmp/webUser \( -name "*.java" -o -name "*.cfm" \) -exec cvs admin -kb {} \;
This is working fine with no detected problems. It was my first time using the parens for multiple files. Find is apparently very, very unforgiving with spacing.
If you use wildcards in a find, either use double quotes around them (as you did above) or escape them.
so, as above
\( -name "*.java" -o -name "*.cfm" \)
is fine
\( -name \*.java -o -name \*.cfm \)
is fine as well
\( -name *.java -o -name *.cfm \)
is not fine, because the wildcards will be interpreted by the shell, where you want them to be interpreted by the find command.
In your initial example you used wildcards with escaping them or putting them within double quotes.