find查找包含某一个字符串的文件

# find <directory> -type f -name "*.c" | xargs grep "<strings>"

<directory>是你要找的文件夹;如果是当前文件夹可以省略
-type f 说明,只找文件
-name "*.c" 表示只找C语言写的代码,从而避免去查binary;也可以不写,表示找所有文件
<strings>是你要找的某个字符串
posted @ 2014-03-28 20:27  坏混混  阅读(1617)  评论(0)    收藏  举报