> Linux命令 >

find+grep组合使用

用来查找所有".h"文件中的含有“helloworld”字符串的文件,并把文件名也打印出来:

find -name "*.h" -exec grep "helloworld" { } \; -print

(责任编辑:IT)