How can I grep only lines from a huge (120GB) httpd error_log based on a time range, say:
from 2011-11-15 11:30 pm
to 2011-11-16 01:30 am
Thanks!
feedback
|
|
You'll probably have to do some drill down, I'd start by getting the date range:
The most efficient way I can think of but haven't done is to find the start and end bytes of your date range and get that; (which is apparently possible with grep) but I dont know how to get a range of bytes from a file - probably takes some awk skills Edit: Since this was an interesting question - I did some more digging: You can get the first byte offset by doing:
| ||||
|
feedback
|