[ILUG] tailing multiple files in one window

Peter McEvoy pete at yerma.org
Fri Aug 12 02:42:20 IST 2005


On Fri, Aug 12, 2005 at 01:22:42AM +0100, Stephen Shirley wrote:
> >>   PB> How about:
> >>   PB> tail -f access.log > /dev/tty & tail -f error.log > /dev/tty
> >>
> >>Fine but it doesn't tell me which file the message is coming from. I
> >>suppose I could write a script...

I seem to have missed the start of this thread, and I know some of the
people that have replied arent stupid, but at the risk of pointing out
the obvious, dont most modern versions of tail allow you to pass
multiple paths to files to them, seperated by a space, and thusly 
prefix any lines with the name of the file name of the file.
I use this, piped through ccze, on any box I admin.

Cheers


-- 
Pete



More information about the ILUG mailing list