linux 多文件中 查找关键字

从当前目录所有的.PHP文件当中 查找内容关键字存在为 ‘test’的文件

find -name '*.php' | xargs grep -l 'test'

也可以为

find -name '*.php' exec grep -l 'test' {} \;

猜你喜欢

转载自michaelyang1988-hotmail-com.iteye.com/blog/1675816
今日推荐