grep在指定类型的文件中查找字符

来源:互联网 发布:linux中退出python 编辑:程序博客网 时间:2024/06/11 23:59

find -name '*.php'|xargs grep 'include'//在当前目录及其子目录的php文件中查找include字符串
find . -name '*.php' -exec grep -i -nH "include" {} \;//同上

 

------------------------------------------------

参考来源:http://www.ai7.org/wp/html/653.html http://yecheng110.blog.hexun.com/10572550_d.html

 

原创粉丝点击