码迷,mamicode.com
首页 > 其他好文 > 详细

常用命令汇总

时间:2019-05-09 23:40:10      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:str   结果   exclude   常用   targe   --   lis   pre   lan   

grep 

-s 不显示错误信息。

 

http://man.linuxde.net/grep

在grep搜索结果中包括或者排除指定文件:

#只在目录中所有的.php和.html文件中递归搜索字符"main()"
grep "main()" . -r --include *.{php,html}

#在搜索结果中排除所有README文件
grep "main()" . -r --exclude "README"

#在搜索结果中排除filelist文件列表里的文件
grep "main()" . -r --exclude-from filelist

 

常用命令汇总

标签:str   结果   exclude   常用   targe   --   lis   pre   lan   

原文地址:https://www.cnblogs.com/aerfa828/p/10841742.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!