Is there any difference between
find . ! -name name1 ! -name name2
and
find . ! -name name1 -a ! -name name2
In what cases should I use “-a”?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As the
findman page states, all primaries are implicitly “anded”, unless you specifically say otherwise. So the two commands are indeed equivalent.Relevant POSIX quote:
So you never need
-abut it may be more readable for larger expressions.