查看日志的时候 用grep 查找某个字段,命令通常这样写:

cat /log路径 grep '关键字'

 

那要是查看两个字段呐? 怎么写命令,于是就百度了一下:

【Linux 】Linux grep 查看日志命令

egrep   'xxx|yyyy|zzz'

 

于是就实际的应用了一下:

cat /data/opt/tomcat/call/logs/catalina.2019-06-12.out | egrep '19061233180083337683487570|order_type'   --color=auto

 --color=auto 自动着色 方便查看

 

相关文章:

  • 2022-02-23
  • 2021-12-22
猜你喜欢
  • 2021-12-06
  • 2021-11-28
  • 2021-11-28
  • 2021-11-28
  • 2021-11-28
  • 2021-11-28
相关资源
相似解决方案