How to display the logs on the basis of a specific Date & Time range in Red Hat Enterprise Linux?

Solution Unverified - Updated -

Issue

  • While displaying the logs on the basis of Date & Time, following does not work:
sed -n '/Sat Feb 27 22:51:27 IST 2015 /,/Sat Feb 28 04:51:27 IST 2015 /p' /var/log/httpd/error_log

Environment

  • Red Hat Enterprise Linux 6.4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.