当前目录下所有代码中查找

find . -name "*.h" | xargs grep 'INCLUDE_THIS_STR' | grep 'EXCLUDE_THIS|OR_THIS' -v

 如

find . -name "*.h" | xargs grep '"' | grep 'include|F("|THROW|""' -v
原文地址:https://www.cnblogs.com/turtlegood/p/4868999.html