Most everyone is familiar with more(1), the gadget that lets you look at voluminous output a page at a time. more is pretty limited though, in that you can only move forward and back by line or screen, and there's no support for searching.
Enter less(1). less is a once public domain, now GNU replacement for more. The original version appeared in the old net.sources pre-Usenet group way back in 1985.
By default, less works just like more. You give it the name of a file to look at, or pipe a command's output to it, and it displays one screen's worth of the stuff and waits for you to hit the spacebar before showing the next screen:
% less .login % ypcat -k aliases | less
% setenv LESS -e
less has lots of other gewgaws and doodads for doing fancy stuff. Consult the man page for details, or read the online help by typing "h" inside less.
If you decide you like less and want to use it as your default pager instead of more, set the PAGER environment variable to less:
% setenv PAGER less
Up to the TTTT index
Tuesday Tiny Techie Tips are all © Copyright 1996-1997 by Jeff Youngstrom. Please ask permission before reproducing any of this material.