Why are the files printed twice?
find . *.{h,cc} -maxdepth 1 -type f
./file7.h
./file8.h
./file9.cc
file7.h
file8.h
file9.cc
Is this correct? How do I specify file patterns?
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.
It’s there twice because it’s finding it first under
., and then under the actual filename as given tofindas a place to search. Perhaps you meant to use-namewhile escaping the wildcards.