1 cat xxx.log | grep '想要查的关键字'
可以查出所有的包含关键字的日志.
2 cat xxx.log | grep '想要查的关键字' -C 5
查处所有包含关键字的日志,同时也会打印处关键字所在行上下5行的日志