首页 > 其他 > 详细

linux下在多个文件夹中查找指定字符串的命令

时间:2014-02-21 23:41:36      阅读:671      评论:0      收藏:0      [点我收藏+]

例如,想要在当前文件夹下的多个.c或者.txt文件中查找“shutdown”字符串,

可以使用“grep shutdown ./*.c”或“grep shutdown ./*.txt”即可

使用find命令如下:find /test -type f -name "*.txt" -exec grep -l "shutdown" {} \;

linux下在多个文件夹中查找指定字符串的命令

原文:http://www.cnblogs.com/wy2325/p/3559323.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!