how to use find to build a list of files with *.cpp *.h *.cc *.mm *.java extensions
Hi,
How can I use find to build a list of files with *.cpp *.h *.cc *.mm *.java extensions? I tried find . -name "*.cpp|*.h|*.java|*.cc|*.mm" -print That prints out nothing. Thank you. |
That won't work because shell globbing isn't regex pattern matching.
Code:
find . \( -name "*.cpp" -o -name "*.cc" \) -print Cheers, Tink |
Take a look at "man find"---especially the -regex option
|
there are other tools too....
´locate´ and ´grep´ are such tools(very powerful) you can use them along with ´find´ |
All times are GMT -5. The time now is 05:48 AM. |