[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suggestion for grep
From: |
Tony Abou-Assaleh |
Subject: |
Re: Suggestion for grep |
Date: |
Tue, 12 Feb 2008 02:02:05 -0400 (AST) |
Hi Marc,
> I hope I'm writing the right person. Have you ever considered writing a
> version of grep that scanned the file backwards? The reason is that I
> often am searching some 20 gig log file knowing that what I'm looking
> for is most likely near the end of the file. So a backwards switch would
> be handy.
The non-deterministic reverse grep, nr-grep, takes this idea further.
Check it out at:
http://www.dcc.uchile.cl/~gnavarro/software/
As for your task, try something like:
tail -1000 access_log | grep mygregexp
I use a similar command to monitor my own logs.
Cheers,
TAA
--
Tony Abou-Assaleh
Email: address@hidden
Web site: http://tony.abou-assaleh.net