how to use the unix “find” command to find all the cpp and h files?

后端 未结 6 2105
南笙
南笙 2021-02-01 03:18

I know that to find all the .h files I need to use:

find . -name \"*.h\"

but how to find all the .h AND .cpp

6条回答
  •  Happy的楠姐
    2021-02-01 03:51

    find -name "*.h" -or -name "*.cpp"
    

    (edited to protect the asterisks which were interpreted as formatting)

提交回复
热议问题