michaelyang 发表于 2013-1-28 22:02:20

linux 多文件中 查找关键字

从当前目录所有的.PHP文件当中 查找内容关键字存在为 ‘test’的文件
 
find -name '*.php' | xargs grep -l 'test'
也可以为
find -name '*.php' exec grep -l 'test' {} \;
 
 
页: [1]
查看完整版本: linux 多文件中 查找关键字