查找含有某字符串的所有文件(grep)

比如想要查询当前目录下哪个文件中含有字符串 “PAGE”:

grep -n "PAGE" *


-n 显示行号

*   表示匹配所有文件

-r  递归查找


参阅:http://151wqooo.blog.51cto.com/2610898/1162118




猜你喜欢

转载自blog.csdn.net/lyh__521/article/details/50347691