more.1

来自「早期freebsd实现」· 1 代码 · 共 357 行

1
357 行
字号
.\" Copyright (c) 1980 The Regents of the University of California..\" All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\"    notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\"    notice, this list of conditions and the following disclaimer in the.\"    documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\"    must display the following acknowledgement:.\"	This product includes software developed by the University of.\"	California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\"    may be used to endorse or promote products derived from this software.\"    without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\"	@(#)more.1	6.6 (Berkeley) 4/18/91.\".TH MORE 1 "April 18, 1991".UC 4.SH NAMEmore, page \- file perusal filter for crt viewing.SH SYNOPSIS.B more[.B \-cdflsu][.B \-\fIn\fP][.B +\fIlinenumber\fP ][.B +/\fIpattern\fP] [ name ...  ].LP.B page.I "more options".SH DESCRIPTION.I  Moreis a filter which allows examination of a continuous textone screenful at a time on a soft-copy terminal.It normally pauses after each screenful, printing --More--at the bottom of the screen.If the user then types a carriage return, one more line is displayed.If the user hits a space,another screenful is displayed.  Other possibilities are enumerated later..PPThe command line options are:.TP.I \-nAn integer which is the size (in lines) of the window which.I morewill use instead of the default..TP.B \-c.I Morewill draw each page by beginning at the top of the screen and erasing each line just before it draws on it.This avoids scrolling the screen, making it easier to read while .I more is writing.This option will be ignored if the terminal does not have the abilityto clear to the end of a line..TP.B \-d.I Morewill prompt the user with the message "Pressspace to continue, \'q\' to quit." at the end of each screenful,and will respond to subsequent illegal user input byprinting "Press \'h\' for instructions." instead of ringing the bell.This is useful if.I moreis being used as a filter in some setting,such as a class,where many users may be unsophisticated..TP.B \-fThis causes.I moreto count logical, rather than screen lines.That is, long lines are not folded.This option is recommended if.I nroffoutput is being piped through.I ul,since the latter may generate escape sequences.These escape sequences contain characters which would ordinarily occupyscreen positions, but which do not print when they are sent to theterminal as part of an escape sequence.Thus.I moremay think that lines are longer than they actually are, and foldlines erroneously..TP.B \-lDonot treat ^\&L (form feed) specially.If this option is not given,.I morewill pause after any line that contains a ^\&L, as if the end of ascreenful had been reached.Also, if a file begins with a form feed, the screen will be clearedbefore the file is printed..TP.B \-sSqueeze multiple blank lines from the output, producing only one blankline.  Especially helpful when viewing.I nroffoutput, this option maximizes the useful information present on the screen..TP.B \-uNormally,.I morewill handle underlining such as produced by.I nroffin a manner appropriate to the particular terminal:  if the terminal canperform underlining or has a stand-out mode,.I morewill output appropriate escape sequences to enable underlining or stand-outmode for underlined information in the source file.  The.I \-uoption suppresses this processing..TP.B +\fIlinenumber\fPStart up at \fIlinenumber\fP..TP.B +/\fIpattern\fPStart up two lines before the line containing theregular expression \fIpattern\fP..PPIf the program is invoked as.I page,then the screen is cleared before each screenful is printed (but onlyif a full screenful is being printed), and.I k\- 1 ratherthan.I k\- 2 lines are printed in each screenful, where.I kis the number of lines the terminal can display..PP.I Morelooks in the file.I /etc/termcapto determine terminal characteristics,and to determine the default window size.On a terminal capable of displaying 24 lines,the default window size is 22 lines..PP.I Morelooks in the environment variable.I MOREto pre-set any flags desired.  For example, if you prefer to view files usingthe.I \-cmode of operation, the.I cshcommand.I "setenv MORE -c"or the.I shcommand sequence.I "MORE='-c' ; export MORE"would cause all invocations of.I more ,including invocations by programs such as.I manand.I msgs ,to use this mode.Normally, the user will place the command sequence which sets up the.I MOREenvironment variable in the.I .cshrcor.I .profilefile..PPIf.I moreis reading from a file, rather than a pipe, then a percentage is displayedalong with the --More-- prompt.This gives the fraction of the file (in characters, not lines) that has beenread so far..PPOther sequences which may be typed when.I morepauses, and their effects, are as follows (\fIi\fP is an optional integerargument, defaulting to 1) :.PP.IP \fIi\|\fP<space>display.I imore lines, (or another screenful if no argument is given).PP.IP ^Ddisplay 11 more lines (a ``scroll'').If.I iis given, then the scroll size is set to \fIi\|\fP..PP.IP dsame as ^D (control-D).PP.IP \fIi\|\fPzsame as typing a space except that \fIi\|\fP, if present, becomes the newwindow size..PP.IP \fIi\|\fPsskip \fIi\|\fP lines and print a screenful of lines.PP.IP \fIi\|\fPfskip \fIi\fP screenfuls and print a screenful of lines.PP.IP \fIi\|\fPbskip back \fIi\fP screenfuls and print a screenful of lines.PP.IP \fIi\|\fP^Bsame as b.PP.IP "q or Q"Exit from.I more..PP .IP =Display the current line number..PP.IP vStart up the editor.I viat the current line..PP.IP hHelp command; give a description of all the.I morecommands..PP.IP \fIi\|\fP/exprsearch for the \fIi\|\fP-th occurrence of the regular expression \fIexpr.\fPIf there are less than \fIi\fP occurrences of \fIexpr\|\fP,and the input is a file (rather than a pipe),then the position in the file remains unchanged.Otherwise, a screenful is displayed, starting two lines before the placewhere the expression was found.The user's erase and kill characters may be used to edit the regularexpression.Erasing back past the first column cancels the search command..PP.IP \fIi\|\fPnsearch for the \fIi\|\fP-th occurrence of the last regular expression entered..PP.IP \'(single quote) Go to the point from which the last search started.If no search has been performed in the current file, this commandgoes back to the beginning of the file..PP.IP !commandinvoke a shell with \fIcommand\|\fP. The characters `%' and `!' in "command" are replaced with thecurrent file name and the previous shell command respectively.If there is no current file name, `%' is not expanded.The sequences "\\%" and "\\!" are replaced by "%" and "!" respectively..PP.IP \fIi\|\fP:nskip to the \fIi\|\fP-th next file given in the command line(skips to last file if n doesn't make sense).PP.IP \fIi\|\fP:pskip to the \fIi\|\fP-th previous file given in the command line.If this command is given in the middle of printing out afile, then.I moregoes back to the beginning of the file. If \fIi\fP doesn't make sense,.I moreskips back to the first file.If.I moreis not reading from a file, the bell is rung and nothing else happens..PP.IP :fdisplay the current file name and line number..PP.IP ":q or :Q"exit from .I more(same as q or Q)..PP.IP .(dot) repeat the previous command..PPThe commands take effect immediately, i.e., it is not necessary totype a carriage return.Up to the time when the command character itself is given,the user may hit the line kill character to cancel the numericalargument being formed.In addition, the user may hit the erase character to redisplay the--More--(xx%) message..PPAt any time when output is being sent to the terminal, the user canhit the quit key (normally control\-\\)..I Morewill stop sending output, and will display the usual --More--prompt.The user may then enter one of the above commands in the normal manner.Unfortunately, some output is lost when this is done, due to thefact that any characters waiting in the terminal's output queueare flushed when the quit signal occurs..PPThe terminal is set to.I noechomode by this program so that the output can be continuous.What you type will thus not show on your terminal, except for the / and !commands..PPIf the standard output is not a teletype, then.I moreacts just like.I cat,except that a header is printed before each file (if there ismore than one)..PP.DTA sample usage of.I morein previewing.I nroffoutput would be.PP	nroff \-ms +2 doc.n | more -s.SH FILES.DT/etc/termcap		Terminal data base.br/usr/lib/more.help	Help file.SH "SEE ALSO"csh(1), man(1), msgs(1), script(1), sh(1), environ(7).SH BUGSSkipping backwards is too slow on large files.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?