Linux 在文件夹的所有文件中查找某字符

命令:

grep -r -e string directory

eg:

    在 /home 目录下的所有文件中查找包含 test 字符串的文件。

 grep -r -e "test" /home/   

 

 

参考:

https://stackoverflow.com/questions/15622328/how-to-grep-a-string-in-a-directory-and-all-its-subdirectories-files-in-linux

posted @ 2019-04-15 11:48  一菲聪天  阅读(24015)  评论(2编辑  收藏  举报