用grep查找包含指定内容的文件

grep -R -w -l 'boot' /etc

只显示文件名不显示内容

-R 递归?

root@ubuntu:/home/www/apollo/static/js# grep -R -w -l 'Oracle执行统计' ./
./189.4cc96b6d078107d8613e.js
./70.8e3d20c35a0fee5be98c.js
./aaa.txt
./163.5cf37bbaef20676e85f2.js

root@ubuntu:/home/www/apollo/static/js#

原文地址:https://www.cnblogs.com/yeyong/p/13722406.html