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

猜你喜欢

转载自www.cnblogs.com/tommy-huang/p/10709810.html