sed -n '/起始时间/,/结束时间/p' 日志文件 | grep '关键字'

查询文件debug.log在2019-11-18 08:00:00~2019-11-18 08:21:00时间段内error关键字出现的位置

 sed -n '/2019-11-18 08:00:00/,/2019-11-18 08:21:00/p' debug.log |grep 'error' 

相关文章:

  • 2022-12-23
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2021-10-07
  • 2021-12-24
  • 2021-11-27
猜你喜欢
  • 2021-07-09
  • 2021-08-09
  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
  • 2022-12-23
  • 2021-07-13
相关资源
相似解决方案