[CLUE-Tech] Tail -f + grep

Dennis J Perkins dperkins2 at qwest.net
Thu Feb 1 20:24:31 MST 2001


Kevin Cullis wrote:

> We also discussed tail -f /var/log/messages which tails in real time the
> message file.  The one thing which I came up with was tailing the
> message file, but also greping for specific lines, such as warnings or
> maybe even hacks into your system.  The idea was interesting, for those
> that can verify this, I'd/we'd like to hear what your thought and
> experience is.
>
> Kevin
>
> _______________________________________________
> CLUE-Tech mailing list
> CLUE-Tech at clue.denver.co.us
> http://clue.denver.co.us/mailman/listinfo/clue-tech

I just tested this and it does work.  If you want to try it yourself, do
this:

from terminal one
-------------
touch testfile
vi testfile


from terminal two
-------------
tail -f testfile | grep OK


from terminal one
-------------
type something in vi.  Every time you save the file, you will see any lines
with OK in them.

--
  Dennis






More information about the clue-tech mailing list