从当前目录所有的.PHP文件当中 查找内容关键字存在为 ‘test’的文件
find -name '*.php' | xargs grep -l 'test'
也可以为
find -name '*.php' exec grep -l 'test' {} \;
本文提供了一种方法,在当前目录的所有PHP文件中搜索包含关键字'test'的内容,通过使用find命令结合grep命令实现快速查找。
从当前目录所有的.PHP文件当中 查找内容关键字存在为 ‘test’的文件
find -name '*.php' | xargs grep -l 'test'
也可以为
find -name '*.php' exec grep -l 'test' {} \;
2191
2883

被折叠的 条评论
为什么被折叠?