查看匹配的行数:
grep -o “关键字xxxx” /etc/tomcat.log | wc – l
最近匹配的记录明细:
grep “关键字xxx” -A 1 /etc/tomcat.log | tail –n 10
查看其中一条前后10行:
grep -C 10 “具体行的唯一标示xxxx” /etc/tomcat.log
NIO4444 博主文章分类:【Linux进阶实战】 ©著作权
查看匹配的行数:
grep -o “关键字xxxx” /etc/tomcat.log | wc – l
最近匹配的记录明细:
grep “关键字xxx” -A 1 /etc/tomcat.log | tail –n 10
查看其中一条前后10行:
grep -C 10 “具体行的唯一标示xxxx” /etc/tomcat.log
linux shell检索关键字并转储到文件中。
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M