Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: "Tailing" grep (Was: cat and grep without destroying file)

From: Michael R. Head <burner(at)suppressingfire.org>
Date: Sun Sep 30 2007 - 18:18:46 EDT

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?

You can use the "watch" program to effectively achieve this functionality.

watch "grep kernel /var/log/syslog | tail -n 20"

> --
> ------------------------------------------------------------------------
> Brian Fahrländer Christian, Conservative, and Technomad
> Evansville, IN http://Fahrlander.net/brian
> ICQ: 5119262 AOL/Yahoo/GoogleTalk: WheelDweller
> ------------------------------------------------------------------------
>

-- 
Michael R. Head 
http://picasaweb.google.com/demiri.head.wedding


-- 
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Received on Sun Sep 30 18:19:28 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 21 2007 - 01:04:45 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library