0
点赞
收藏
分享

微信扫一扫

linux专栏 04.常用命令 02.grep

精进的医生 2022-03-30 阅读 38
linux

02.grep

[toc]{type: “ol”, level: [2, 3, 4, 5]}

grep 文本搜索工具
grep [option] file
option
    --color=auto 对匹配到的行添加颜色
    -v 取反
    -i 不区分大小写
    -n 查找的内容增加行号
    -c 打印匹配到的行数
    -o 只显示匹配到的文字
    -q 静默模式
    -A * after 向下显示*行
    -B * before 向上显示*行
    —C * context 上下分别显示*行
    -e 或者 grep -e 'user' -e 'root' passwd
    -E 扩展正则表达式
    -F 不使用正则表达式
    -r 递归
    -w 匹配整个单词
举报

相关推荐

linux专栏 04.常用命令 04.压缩

linux专栏 04.常用命令 01.find

linux常用命令

【linux 常用命令】

Linux常用命令

【Linux常用命令】

linux常用命令:

0 条评论