[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Simple Unix utility?


One task I do commonly is monitor my system log files using
'tail -f'.

I was wondering if there was a commonly used method for doing the
same thing, but filtering it at the same time.

For example, I like to view the logs on the LinuxHQ website as they are
being generated, but I don't care about gif's and jpeg's, or accesses
from my domain.  So I end up using something like this (in a wide xterm):

$ watch -n 10 'tail -100 /opt/linuxhq/livesite/var/log/access.log |
    grep -v "gif|jpg|jimpick\.com" | tail -20 | cut -c1-175'

It works - but it obviously isn't the most efficient way of doing this.

I was wondering if there was a Unix utility I may have overlooked
that does the same sort of thing.  I know I could probably write a
Perl script to do the same thing - but it seems like a general enough
problem that there is probably something that handles it already.


 - Jim

Attachment: pgpqOv8mHW0iy.pgp
Description: PGP signature

Reply to: