📄 pg.1
字号:
.\" @(#)pg.1 1.7 (gritter) 4/25/01.TH PG 1 "2001-04-25" "Gunnar Ritter" "User Commands".SH NAMEpg \- browse pagewise through text files.SH SYNOPSIS.B pg[.I \-number] [.BI \-p \ string] [.B \-cefnrs] [.I +line] [.I +/pattern/] [ file . . . ].SH DESCRIPTION.I Pgdisplays a text file on a.SM CRTone screenful at once.After each page, a prompt is displayed. The user may then either press thenewline key to view the next page or one of the keys described below..PPIf no filename is given on the command line,.I pgreads from standard input.If the standard output is not a terminal,.I pgacts like.IR cat (1)but precedes each file with its name if there is more than one..PPIf input comes from a pipe,.I pgstores the data in a buffer file while readingto make navigation possible..SH OPTIONS.I Pgaccepts the following options:.TP.BI \- numberThe number of lines per page. Usually, this is the number of.SM CRTlinesminus one..TP.B \-cClear the screen before a page is displayedif the terminfo entry for the terminal provides this capability..TP.B \-e.I pgwill not pause and display .SM (EOF)at the end of a file..TP.B \-f.I pgdoes not split long lines..TP.B \-nWithout this option, commands must be terminated by a newline character. Withthis option,.I pgadvances once a command letter is entered..TP.BI \-p \ stringInstead of the prompt.I " :",.I stringis displayed.If.I stringcontains.I %d, its first occurence is replaced by the number of the current page..TP.B \-rDisallow the shell escape..TP.B \-sPrint messages in.I standoutmodeif the terminfo entry for the terminal provides this capability..TP.BI + numberStart at the given line..TP.BI +/ pattern /Start at the line containing the Basic Regular Expression.I patterngiven..SH USAGEThe following commands may be entered at the prompt. Commands preceeded by.I iin this document accept a number as argument, positive or negative.If this argument starts with.I +or.I \-,it is interpreted relative to the current position in the input file,otherwise relative to the beginning..TP.IB i <newline>Display the next or the indicated page..TP\fIi\fR\fBd\fR or \fB^D\fRDisplay the next halfpage. If.I iis given, it is always interpreted relative to the current position..TP.IB i lDisplay the next or the indicated line..TP.IB i fSkip a page forward..I imust be a positive number and is always interpreted relativeto the current position..TP\fIi\fR\fBw\fR or \fIi\fR\fBz\fRBehave as.I <newline>except that .I ibecomes the new page size..TP.BR . " or " ^LRedraw the screen..TP.B $Advance to the last line of the input file..TP.IB i / pattern /Search forward until the first or the \fIi\fR-thoccurence of the Basic Regular Expression .I patternis found. The search startsafter the current page and stops at the end of the file. No wrap-around isperformed..I imust be a positive number..TP\fIi\fR\fB?\fR\fIpattern\fR\fB?\fR or \fIi\fR\fB^\fR\fIpattern\fR\fB^\fRSearch backward until the first or the \fIi\fR-thoccurence of the Basic Regular Expression.I patternis found. The search startsbefore the current page and stops at the beginning of the file.No wrap-around is performed. .I imust be a positive number..PPThe search commands accept an added letter. If.B tis given, the line containing the pattern is displayed at the top of thescreen, which is the default..B mselects the middle and.B bthe bottom of the screen.The selected position is used in following searches, too..TP.IB i nAdvance to the next file or.I ifiles forward..TP.IB i pReread the previous file or.I ifiles backward..TP.BI s \ filenameSave the current file to the given.I filename..TP.B hDisplay a command summary..TP.BI ! commandExecute.I commandusing the shell..TP.BR q " or " QQuit..PPIf the user presses the interrupt or quit key while.I pgreads from theinput file or writes on the terminal,.I pgwill immediately display the prompt.In all other situations these keys will terminate.I pg..SH "ENVIRONMENT VARIABLES"The following environment variablesaffect the behaviour of.I pg:.TP.B COLUMNSOverrides the system-supplied number of columns if set..TP.BR LANG ,\ LC_ALL ,\ LC_COLLATE ,\ LC_CTYPE ,\ LC_MESSAGESSee.IR locale (7)..TP.B LINESOverrides the system-supplied number of lines if set..TP.B SHELLUsed by the.B !command..TP.B TERMDetermines the terminal type..SH "SEE ALSO".BR cat (1),.BR more (1),.BR sh (1),.BR terminfo (5),.BR locale (7),.BR regex (7),.BR term (7).SH NOTES.I pgexpects the terminal tabulators to set on eight positions..PPFiles that include.SM NULcharacters cannot be displayed by.IR pg .
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -