101-500 Exam QuestionsBrowse all questions from this exam

101-500 Exam - Question 60


Given a log file loga.log with timestamps of the format DD/MM/YYYY:hh:mm:ss, which command filters out all log entries in the time period between 8:00 am and 8:59 am?

Show Answer
Correct Answer: E

To filter log entries between 8:00 am and 8:59 am, the correct grep command needs to match timestamps formatted as ':08:[0-9]+:[0-9]+'. This ensures we match any minutes and seconds within the 8:00 am to 8:59 am time range. Option E uses the '-E' flag for extended regex and correctly matches hours, minutes, and seconds in the specified range.

Discussion

1 comment
Sign in to comment
AmycertOption: E
Feb 5, 2023

E is correct, tested

Reseko
Aug 31, 2023

Exactly, tested by me, and the only one that returns correct values is option E