linux 主机上快速查看某个具体的日志

1    cat xxx.log | grep '想要查的关键字'

可以查出所有的包含关键字的日志.

2    cat xxx.log | grep '想要查的关键字' -C 5

查处所有包含关键字的日志,同时也会打印处关键字所在行上下5行的日志

猜你喜欢

转载自blog.csdn.net/m0_60868799/article/details/128835622
今日推荐