搜索当前目录下所有含字符串“”的文件
chenlei
posted @ 2011年11月23日 17:00
in Linux
, 4202 阅读
搜索当前目录下所有含字符串“”的文件
find . -type f -exec grep "string" {} \; -print
搜索当前目录下所有含字符串“”的.c文件
find . -type f -regex ".*\.c " -exec grep "string " {} \; -print
2011年11月24日 16:19
这种情况为了速度我一般是locate -r XXXX|grep `pwd`
但是locate似乎不支持filetype结果可能会将一群文件夹显示出来