在 .h 和 cpp 中查找 :grep consume ~/test/2016/AMQP-CPP/**/*.cpp ~/test/2016/AMQP-CPP/**/*.h -r

:grep  consume  ~/test/2016/AMQP-CPP/**/*.cpp  ~/test/2016/AMQP-CPP/**/*.h  -r

-w "whole" 匹配整个单词

:grep -w "consume"  ~/test/2016/AMQP-CPP/**/*.cpp  ~/test/2016/AMQP-CPP/**/*.h  -r
原文地址:https://www.cnblogs.com/chunyou128/p/5241770.html