I want to run find -name with multiple file types.
Eg.
find -name *.h,*.cpp
Is this possible?
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.
To find this information in the
manpage, typeman findand the search for operators by typing/OPERATORSand hit enter.The
.isn’t strictly necessary with GNU find, but is necessary in Unix. The quotes are important in either case, and leaving them out will cause errors if files of those types appear in the current directory.On some systems (such as Cygwin), parentheses are necessary to make the set of extensions inclusive: