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

Re: how to tail w/o folding the output?



Dave Sherohman wrote:
On Thu, Aug 24, 2006 at 08:50:50AM -0500, Hugo Vanwoerkom wrote:
Hi,

How do you run tail and not have it fold the output?

E.g. I run:

tail -s 1 -n 40 -f kern.log

But it folds the output so that what is messy is now messier...

So you want the lines to be cut off at the end of the screen rather than
wrapping onto the next line?  You can do this with:

tail -s 1 -n 40 -f kern.log | cut -c 1-80

(I'm assuming an 80-column display.  Change the '1-80' to match your
screen size if this assumption is not correct.)

That doesn't seem terribly useful to me, though, since it discards a lot
of potentially important information.  Did I misunderstand what you were
looking for?


That's exactly what I want.

Background:

I am experimenting with bind9 as a cache-only nameserver. Apparently that negates the use of ulogd, so that kern.log now floods with:

Aug 24 13:32:09 debian kernel: ''IN-internet':'IN=ppp0 OUT= MAC= SRC=74.132.53.73 DST=200.57.201.15...

I like to keep a vt open with kern.log tailed so that I can watch for mainly disk errors.

If I see something I would use an editor to look at it.

Thanks.

H










Reply to: