How to get all the log entries in the last 2 hours?
I am running apache on Ubuntu.
Use grep -E "pattern" logfile
Option -E is for extended regular expression.
So at 13 hrs, you could grep for 13, 12 to give you last 2 hr period
grep -E "Jan 27 (13|12)" /var/log/syslog