想遍历搜索某个目录下的全部文件内容,如何实现?

grep -rnw '/path/to/somewhere/' -e "搜索文本"

参考资料:
https://stackoverflow.com/questions/16956810/how-do-i-find-all-files-containing-specific-text-on-linux
https://blog.csdn.net/aerchi/article/details/73774093

Related Posts: Linux遍历查找文件内容 :

avatar