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

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



On Thu, Aug 24, 2006 at 12:50:13PM EDT, 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 also the way I understand the OP's query.

Another possible solution:

$ less kern.log

  Shift+F              /* switch to 'forward for ever' mode      */

  right/left-arrow     /* to pan the display left/right          */

  Ctrl+C               /* return to regular display mode         */

  h                    /* display less's keyboard controls       *

Another nice thing about this method is that once you have switched
back to "regular" display mode, you can do stuff like searching
backward for another occurrence of a message etc.. 

Thanks

cga



Reply to: