linux grep命令详解
来源:互联网 发布:软件测试看什么书 编辑:程序博客网 时间:2024/06/14 21:40
grep常用用法:
grep [-acinv] [--color=auto] '搜寻字符串' filename选项与参数:-a :将 binary 文件以 text 文件的方式搜寻数据-c :计算找到 '搜寻字符串' 的次数-i :忽略大小写的不同,所以大小写视为相同-n :顺便输出行号-v :反向选择,亦即显示出没有 '搜寻字符串' 内容的那一行!--color=auto :可以将找到的关键词部分加上颜色的显示!
根据文件内容递归查找目录:
grep 'hello' test.c
printf("hello world\n");
grep -r 'hello' test.c 在当前目录及其子目录下搜索含义hello字符串的文件
0 0
- linux命令 grep详解
- linux grep命令详解
- linux grep命令详解
- linux grep命令详解
- linux grep命令详解
- linux grep命令详解
- linux grep命令详解
- Linux grep命令详解
- linux grep命令详解
- linux grep命令详解
- Linux grep命令详解
- linux grep命令详解
- linux grep命令详解
- linux grep命令详解
- linux grep命令详解
- linux grep命令详解
- Linux grep命令详解
- linux grep命令详解
- java内存使用
- 九度oj 守型数 1183
- Java获取当前年月日、时间
- Jframe框架基本结构和继承关系
- 数据结构与算法——二分查找(C语言)
- linux grep命令详解
- 对三层的四个问题
- 九度oj 数位拆解 1064
- 在web中实现邮件发送功能
- Atom编辑器入门到精通(三) 文本编辑基础
- VMware vSphere搭建云计算基础架构
- 高效空间索引技术
- ActiveMQ could not be locked错误
- 前端之新闻切换卡