grep查找文件中的关键词



grep查找文件中的关键词
 
-- r表示递归,n表示显示行号 include表示只找php,
hello,world是查找内容,mydir是查找目录
  www.2cto.com  
grep -nr --include="*.php"  "hello,world" /mydir/
 
-- 只显示文件清单,不显示行数,和匹配内容
 
grep -lr --include="*.php"  "hello,world" /mydir/
 

相关内容

    暂无相关文章