I want to find all *.h
,*.cpp
files in folders with defined mask, like */trunk/src*
. So, I can find separately *.h
and *.cpp
files:
find . -path "*/trunk/src/*.h"
find . -path "*/trunk/src/*.cpp"
What is the best way to get the file-list both of types (*.h
and *.cpp
)?
PS I'd like to pipe the list to grep
.
Best Answer
You can use
-o
for "or":which is the same as
If you want to run grep on these files:
or