View Single Post
  #4   (View Single Post)  
Old 24th October 2011
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

To expand on the previous answers:

From man(1)

Code:
     -P pager
             Use specified pager.  Defaults to “less -sR” if color support is
             enabled, or “more -s”.  Overrides the MANPAGER environment vari‐
             able, which in turn overrides the PAGER environment variable.
Using % man cat | less is exactly the same as just using % man cat.

As for searching, you can either use the / key in less, or use % man ls | egrep pattern

Both methods support regular expressions are are basically the same, the (e)grep method is more suited for commandline/scripted use, while the interactive search in less is for interactive use.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.

Last edited by Carpetsmoker; 24th October 2011 at 09:44 AM.
Reply With Quote