Mehulo Savla

Registered
Aug 2, 2018
1
0
1
India
cPanel Access Level
Root Administrator
Am trying to grep logs between 02/Aug/2018:13:12:00 and 02/Aug/2018:13:15:59 but unable to succeed with single command.

Please suggest if there is any single command to display logs of above timestamps.

Regards,
Mel
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,266
313
Houston
  • Like
Reactions: Mehulo Savla

sparek-3

Well-Known Member
Aug 10, 2002
2,019
225
368
cPanel Access Level
Root Administrator
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.
 
  • Like
Reactions: rarod