Skip to main content

Grep logs between to 2 timestamps?

Comments

5 comments

  • rarod
    Can you use journalctl?. If yes: journalctl --since "2015-06-26 23:15:00" --until "2015-06-26 23:20:00"
    0
  • cPanelLauren
    Hello, If you can't use journalctl as suggested by @rarod awk would most likely work. Something similar to what's suggested here: How to extract logs between two time stamps and Get lines between two timestamps from a file Thanks!
    0
  • sparek-3
    The simplest solution: grep 02/Aug/2018:13:1[2-5]: This will match lines that have 02/Aug/2018:13:12:, 02/Aug/2018:13:13:, 02/Aug/2018:13:14:, and 02/Aug/2018:13:15: admittedly this get a bit more complicated if the time frame is narrowed down much more or more complex.
    0
  • Mehulo Savla
    Although had liked messages long back, want to say Thank you for the assistance.
    0
  • hidessh
    get a bit more complicated if the time frame is narrowed down much more or more complex.
    0

Please sign in to leave a comment.