Linux常用日志查询方法

  1. 查询实时日志中包含Exception或error的内容
  2.  
    tail -f *.log | grep -E 'Exception|ERROR' --color=auto
  3. 查询指定行之间的内容  第2行 到第5行的内容  2 3 4 5 共4行的内容查询指定行之间的内容  第2行 到第5行的内容  2 3 4 5 共4行的内容
  4. sed -n '2,5p' test.log

     

 

posted @ 2020-06-30 11:04  zbdxtn  阅读(233)  评论(0)    收藏  举报