GREP查询关键字在哪个文件里

grep -wr "要查询的关键字" *

 
带关键字上下1行的查询

grep -rnC 1 "// for test"

 

posted @ 2017-08-11 12:27  北里闻箫  阅读(1026)  评论(0)    收藏  举报