more or less
The more and less programs are 'pagers', they display text a screenful at a time. They are very useful for viewing long files and the output of other programs:
less <filename> somecommand | less
This page provides a tiny subset of the information found in the many thousands of words of man-pages. If what you are trying to do doesn't work in more, try less.
Navigation & Searching
These commands are similar to the vi text editor. As such they are generally useful.
| Next/Prev page | Space or PgDwn/PgUp |
| Scroll up/down | arrows or j/k keys |
| Search for foo | /foo[enter] |
| Next search result | n |
| Prev search result | N |
| Skip to line n | n shift-g |
| Skip to end | shift-g |
| Search backwards | ?foo[enter] |
| Quit | q |
| Load in editor | v |
Searches are case-sensitive by default; use "less -i" to get case-insensitive searches.
$PAGER environment variable
Some programs, eg man, use a pager to display information a screenful at a time. Therefore you can probably navigate and search man pages using the shortcuts above. Programs look at the $PAGER, environment variable, to decide which command to use. In my profile I use:
export PAGER="less -i -s -F"
