"Tailing" grep (Was: cat and grep without destroying file)
Joel Goguen
jtgoguen at gmail.com
Sun Sep 30 22:33:27 UTC 2007
On Sun, 2007-09-30 at 17:04 -0500, Brian Fahrlander wrote:
> While we've got the attention of the most-able on this subject, I'd
> like to reopen a discussion about a very similar tool: a 'grep' that
> happens on tailing a file. There have been dozens of times that I'm
> looking for a message number in /var/log/mail.log and would love to see
> only the lines mentioning that message.
>
> A couple of years ago I asked and got a "maybe you could write
> something", but I actually never could. It's not as easy as it looks.
>
> Any chance you guys have seen this done?
>
> --
> ------------------------------------------------------------------------
> Brian Fahrländer Christian, Conservative, and Technomad
> Evansville, IN http://Fahrlander.net/brian
> ICQ: 5119262 AOL/Yahoo/GoogleTalk: WheelDweller
> ------------------------------------------------------------------------
>
I have a great deal of success with 'tail -f /var/log/mail.log | grep
XX' where XX is whatever you're looking for. I actually use that exact
set of commands on a daily basis when I'm at work.
--
Joel Goguen
http://jgoguen.net/
The human mind treats a new idea the way the body treats a strange
protein -- it rejects it. -- P. Medawar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20070930/94fa9333/attachment.sig>
More information about the ubuntu-users
mailing list