Re: tail -f | less



On Thu, 26 Apr 2007 16:28:11 -0700, CptDondo wrote:

Sam wrote:
CptDondo writes:

I'm looking for ideas on how to implement a tail -f | less type of
thing...

I need to display a logfile as it's being dumped, and give the user
the ability to pause and scroll back. The data needs not be kept but
can be dumped into a ring buffer. Nothing more.

And "tail -f | less" doesn't work in exactly what way?

There's some buffering issues here, but they can be solved, with a bit
of effort.


Well, I am using the busybox version of less, which is more like 'more'...

And it's those buffering issues I need to solve, yes.

Hey, I was hoping to save a bit of that 'bit of effort'... :-)

--Yan

You can use the "real" version of less, instead of the busybox version. I
have taken this approach for minimal systems that I have created. That
is, I have used busybox for most tools, but have replaced critical
tools which do not work as expected for whatever reason. My minimal
systems work with about 16M reserved for tools and libraries. Other
minimal systems can chop that down to 4M, IIRC. 16M is fine for my
purposes, especially when functionality is at the top of my list, but
apparently 16M is "fat" for some purposes.

--
Douglas Mayne

.