RE: [SLUG] Konsole stuff

From: Eben King (eben1@tampabay.rr.com)
Date: Wed Dec 07 2005 - 11:56:28 EST


On Wed, 7 Dec 2005, Mike Branda wrote:

> On Wed, 2005-12-07 at 09:43 -0500, Eben King wrote:
> > On Wed, 7 Dec 2005, Sick Twist wrote:
> >
> > > >From: Bob Stia <rnr@sanctum.com>
> > > >Reply-To: slug@nks.net
> > > >To: slug@nks.net
> > > >Subject: [SLUG] Konsole stuff
> > > >Date: Wed, 7 Dec 2005 01:12:09 -0500
> > > >
> > > >Also, when I run a command that prints many screens of info you cannot
> > > >get back to the early info and/or input command. Yes, you can scroll
> > > >back but it only goes so far, leaving the earlier info hidden.
> > >
> > > If a command creates several screens of output, you can pipe the output to
> > > less by appending "| less" to the end of the command. Here are two examples:
> > >
> > > lspci -v | less
> > > ls -ld ~/* | less
> >
> > Or use the scroll wheel (or whatever) on the mouse when in X, or
> > shift-pageUp/pageDown when not. Then ls's output will be in color (by
> > default it's not when writing to a pipe).
>
> Another fun fact that I learned along the way that nobody told me about
> is that while in "less" or "man" (which on my machine uses less as the
> pager) you can use a "/" with a search word after it and it will
> highlight all the instances of that search word. the letter "n" brings
> you to the next instance.
>
> try:
>
> man ls
>
> type "/file" (without the quotes) and then press return. Then press the
> letter "n" a few times. Comes in handy when you cant remember what the
> argument is for something but you know the word of what you're trying to
> do.

Yes. I think "man" actually uses "less", so anything you can do in "less",
you can do in "man" (and for the most part, vice versa).

less(1) says you can make it do line numbering with "-N". It counts actual
lines, not screen lines, so you may see what appear to be duplicate numbers.
"-S" means no duplicates, but long lines go off the edge of your screen.
I suppose you could run stuff through "fold -s | less -N" and have neither,
but that's getting silly. None of these "long lines" phenomena applies to
"man", as its display is sized to fit your terminal.

-- 
-eben      ebQenW1@EtaRmpTabYayU.rIr.OcoPm      home.tampabay.rr.com/hactar
An ASCII character walks into a bar and orders a double. "Having a bad day?"
asks the barman. "Yeah, I have a parity error," replies the ASCII character.
The barman says, "Yeah, I thought you looked a bit off." -- Skud

----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:16:32 EDT