I want to extract some lines from a log file pertaining to a certain date and time frame. The log file is /var/log/messages and it's huge: 7.4 MB gzipped, or 973,367 lines.
I would like to extract, say, Feb 11 between 5-6 AM and save in another file or even view it on the command line (like with vi or something)
I tried "cat messages.1.gz | grep "Feb 11"" and it didn't do anything.
What about for a certain date (Feb 11) and some other entry in the line, for instance, a certian IP address? grep Feb 11 | grep 192.168.1.123?
Thank you very much