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 pageSpace or PgDwn/PgUp
Scroll up/downarrows or j/k keys
Search for foo/foo[enter]
Next search resultn
Prev search resultN
Skip to line nn shift-g
Skip to endshift-g
Search backwards?foo[enter]
Quitq
Load in editorv

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"