Pagers
A pager is a program that will allow you to
browse through a file 'one page at a time', moving backwards and
forwards through the file with the minimum of keystrokes. The
standard pager is more, although others may be
available on your machine (two other commonly encountered pagers
are pg (page) and less). To invoke
more, type more followed by the name of
the file you wish to examine. For example, to view the file called
/usr/dict/words:
$ more /usr/dict/words
The following keystrokes will be useful:
| Space |
view next page |
b |
view previous page |
| Return |
scroll forward one line |
? |
display a page of help on your terminal |
q |
quit |
The commands that more understands are similar to
Vi, and you can, for instance, type /hello to move to
an instance of the string hello in the file. The
command cat, which was discussed earlier, is fine for
viewing small files, but should not be used as a substitute for a
good pager for general viewing of text files.
|