Monday 10 April 2017

pg command

pg is a terminal pager program for viewing text files.

Terminal Pager
A terminal pager, or paging program, is a computer program used to view (but not modify) the contents of a text file moving down the file one line or one screen at a time. Some, but not all, pagers allow movement up a file.  It can also be used to page through the output of a command via a pipe. pg uses an interface similar to VI. more, and less are also commonly used paging programs.

pg
After each page, a prompt is displayed. If no filename is given on the command line, pg reads from standard input.  If the standard output is not a terminal, pg acts like cat but precedes each file with its name if there is more than one. If input comes from a pipe, pg stores the data in a buffer file while reading to make navigation possible.

Syntax
pg [options] [ +/Pattern/ ] [file_name]

Options
Sub-commands
The following sub-commands will display a specific place in the file:

No comments:

Post a Comment