linux 实用命令find+grep 备忘
2017-03-27 23:44
267 查看
一、查找 指定 字符串(find+grep)
/* 2015-05-17 */ /* 快速查找多个文件中的指定文本 */ # # find ./ -name "*.c" -exec grep "10000000" -n -H {} \; | grep "return" | grep "has"
注意:
1. 不解释各命令 具体option 的 具体用法;
2. find -option “” 可单独使用 来查找文件;
3. grep的选项, -H 显示具体文件, -n 显示行号;
二、 拷机收集关键信息。
/* 2017-03-27 */ /* PC需要关机-只能后台 */ # # while true; do mt tms dis i >> /mnt/collect.log; mt dis msw mod >> /mnt/collect.log; sleep 2 ; done & # top >> /mnt/collect.log &
三、 未完待续。
相关文章推荐
- linux中对代码、文件查找的两个重要命令grep和find
- Linux下的五个查找命令:grep、find、locate、whereis、which
- linux命令之find、grep
- linux中强大且常用命令:find、grep
- Linux笔记 find和grep命令
- Linux新手生存笔记[6]——重点命令3-grep&sort&find&uniq
- linux 下查找文件和字符串命令 find grep
- Linux下的五个查找命令:grep、find、locate、whereis、which
- linux/unix: grep与find常用命令
- linux grep find 命令
- Linux下的五个查找命令:grep、find、locate、whereis、which
- linux查找命令、find、grep找到需要的文件
- linux中强大且常用命令:find、grep
- linux查找命令、find、grep
- linux find grep 查找文件命令
- Linux 命令find,tar,ps,grep,sed,awk
- Linux内、外部命令的使用、文件权限、文件查找(find、locate、grep)
- Linux的grep和find命令
- find 和 grep 命令 常用实用例子
- Linux之常用Shell命令:grep,find