If you want to find some files include the certain centenses , for example , you would like to find which .cpp files have include the head file "hello.h", you can use find command like this:
find /findPath -name "*.cpp" | xargs grep "hello.h"
then you will get the file list which has sentences with words "hello.h".
本文介绍了一种使用find命令结合xargs和grep来搜索包含特定头文件hello.h的所有C++源文件的方法。通过这种方式,可以快速定位到包含该头文件的.cpp文件列表。
313

被折叠的 条评论
为什么被折叠?



