[BACK]Return to more.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / more

Annotation of src/usr.bin/more/more.1, Revision 1.4

1.4     ! etheisen    1: .\"    $OpenBSD$
1.3       etheisen    2: .\" Copyright (c) 1980 The Regents of the University of California.
1.1       deraadt     3: .\" All rights reserved.
                      4: .\"
                      5: .\" Redistribution and use in source and binary forms, with or without
                      6: .\" modification, are permitted provided that the following conditions
                      7: .\" are met:
                      8: .\" 1. Redistributions of source code must retain the above copyright
                      9: .\"    notice, this list of conditions and the following disclaimer.
                     10: .\" 2. Redistributions in binary form must reproduce the above copyright
                     11: .\"    notice, this list of conditions and the following disclaimer in the
                     12: .\"    documentation and/or other materials provided with the distribution.
                     13: .\" 3. All advertising materials mentioning features or use of this software
                     14: .\"    must display the following acknowledgement:
                     15: .\"    This product includes software developed by the University of
                     16: .\"    California, Berkeley and its contributors.
                     17: .\" 4. Neither the name of the University nor the names of its contributors
                     18: .\"    may be used to endorse or promote products derived from this software
                     19: .\"    without specific prior written permission.
                     20: .\"
                     21: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     22: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     23: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     24: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     25: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     26: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     27: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     28: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     29: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     30: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     31: .\" SUCH DAMAGE.
                     32: .\"
1.3       etheisen   33: .\"    @(#)more.1      6.6 (Berkeley) 4/18/91
1.1       deraadt    34: .\"
1.3       etheisen   35: .TH MORE 1 "April 18, 1991"
                     36: .UC 4
                     37: .SH NAME
                     38: more, page \- file perusal filter for crt viewing
                     39: .SH SYNOPSIS
                     40: .B more
                     41: [
                     42: .B \-cdflsu
                     43: ]
                     44: [
                     45: .B \-\fIn\fP
                     46: ]
                     47: [
                     48: .B +\fIlinenumber\fP
                     49: ]
                     50: [
                     51: .B +/\fIpattern\fP
                     52: ] [ name ...  ]
                     53: .LP
                     54: .B page
                     55: .I "more options"
                     56: .SH DESCRIPTION
                     57: .I  More
                     58: is a filter which allows examination of a continuous text
                     59: one screenful at a time on a soft-copy terminal.
                     60: It normally pauses after each screenful, printing --More--
                     61: at the bottom of the screen.
                     62: If the user then types a carriage return, one more line is displayed.
                     63: If the user hits a space,
                     64: another screenful is displayed.  Other possibilities are enumerated later.
                     65: .PP
                     66: The command line options are:
                     67: .TP
                     68: .I \-n
                     69: An integer which is the size (in lines) of the window which
                     70: .I more
                     71: will use instead of the default.
                     72: .TP
                     73: .B \-c
                     74: .I More
                     75: will draw each page by beginning at the top of the screen and erasing
                     76: each line just before it draws on it.
                     77: This avoids scrolling the screen, making it easier to read while
                     78: .I more
                     79: is writing.
                     80: This option will be ignored if the terminal does not have the ability
                     81: to clear to the end of a line.
                     82: .TP
                     83: .B \-d
                     84: .I More
                     85: will prompt the user with the message "Press
                     86: space to continue, \'q\' to quit." at the end of each screenful,
                     87: and will respond to subsequent illegal user input by
                     88: printing "Press \'h\' for instructions." instead of ringing the bell.
                     89: This is useful if
                     90: .I more
                     91: is being used as a filter in some setting,
                     92: such as a class,
                     93: where many users may be unsophisticated.
                     94: .TP
                     95: .B \-f
                     96: This causes
                     97: .I more
                     98: to count logical, rather than screen lines.
                     99: That is, long lines are not folded.
                    100: This option is recommended if
                    101: .I nroff
                    102: output is being piped through
                    103: .I ul,
                    104: since the latter may generate escape sequences.
                    105: These escape sequences contain characters which would ordinarily occupy
                    106: screen positions, but which do not print when they are sent to the
                    107: terminal as part of an escape sequence.
                    108: Thus
                    109: .I more
                    110: may think that lines are longer than they actually are, and fold
                    111: lines erroneously.
                    112: .TP
                    113: .B \-l
                    114: Do
                    115: not treat ^\&L (form feed) specially.
                    116: If this option is not given,
                    117: .I more
                    118: will pause after any line that contains a ^\&L, as if the end of a
                    119: screenful had been reached.
                    120: Also, if a file begins with a form feed, the screen will be cleared
                    121: before the file is printed.
                    122: .TP
                    123: .B \-s
                    124: Squeeze multiple blank lines from the output, producing only one blank
                    125: line.  Especially helpful when viewing
                    126: .I nroff
                    127: output, this option maximizes the useful information present on the screen.
                    128: .TP
                    129: .B \-u
1.1       deraadt   130: Normally,
1.3       etheisen  131: .I more
                    132: will handle underlining such as produced by
                    133: .I nroff
                    134: in a manner appropriate to the particular terminal:  if the terminal can
                    135: perform underlining or has a stand-out mode,
                    136: .I more
                    137: will output appropriate escape sequences to enable underlining or stand-out
                    138: mode for underlined information in the source file.  The
                    139: .I \-u
                    140: option suppresses this processing.
                    141: .TP
                    142: .B +\fIlinenumber\fP
                    143: Start up at \fIlinenumber\fP.
                    144: .TP
                    145: .B +/\fIpattern\fP
                    146: Start up two lines before the line containing the
                    147: regular expression \fIpattern\fP.
                    148: .PP
                    149: If the program is invoked as
                    150: .I page,
                    151: then the screen is cleared before each screenful is printed (but only
                    152: if a full screenful is being printed), and
                    153: .I k
                    154: \- 1 rather
                    155: than
                    156: .I k
                    157: \- 2 lines are printed in each screenful, where
                    158: .I k
                    159: is the number of lines the terminal can display.
                    160: .PP
                    161: .I More
                    162: looks in the file
1.4     ! etheisen  163: .I /usr/share/misc/termcap
1.3       etheisen  164: to determine terminal characteristics,
                    165: and to determine the default window size.
                    166: On a terminal capable of displaying 24 lines,
                    167: the default window size is 22 lines.
                    168: .PP
                    169: .I More
                    170: looks in the environment variable
                    171: .I MORE
                    172: to pre-set any flags desired.  For example, if you prefer to view files using
                    173: the
                    174: .I \-c
                    175: mode of operation, the
                    176: .I csh
                    177: command
                    178: .I "setenv MORE -c"
                    179: or the
                    180: .I sh
                    181: command sequence
                    182: .I "MORE='-c' ; export MORE"
                    183: would cause all invocations of
                    184: .I more ,
                    185: including invocations by programs such as
                    186: .I man
                    187: and
                    188: .I msgs ,
                    189: to use this mode.
                    190: Normally, the user will place the command sequence which sets up the
                    191: .I MORE
                    192: environment variable in the
                    193: .I .cshrc
                    194: or
                    195: .I .profile
                    196: file.
                    197: .PP
                    198: If
                    199: .I more
                    200: is reading from a file, rather than a pipe, then a percentage is displayed
                    201: along with the --More-- prompt.
                    202: This gives the fraction of the file (in characters, not lines) that has been
                    203: read so far.
                    204: .PP
                    205: Other sequences which may be typed when
                    206: .I more
                    207: pauses, and their effects, are as follows (\fIi\fP is an optional integer
                    208: argument, defaulting to 1) :
                    209: .PP
                    210: .IP \fIi\|\fP<space>
                    211: display
                    212: .I i
                    213: more lines, (or another screenful if no argument is given)
                    214: .PP
                    215: .IP ^D
                    216: display 11 more lines (a ``scroll'').
                    217: If
                    218: .I i
                    219: is given, then the scroll size is set to \fIi\|\fP.
                    220: .PP
                    221: .IP d
                    222: same as ^D (control-D)
                    223: .PP
                    224: .IP \fIi\|\fPz
                    225: same as typing a space except that \fIi\|\fP, if present, becomes the new
                    226: window size.
                    227: .PP
                    228: .IP \fIi\|\fPs
                    229: skip \fIi\|\fP lines and print a screenful of lines
                    230: .PP
                    231: .IP \fIi\|\fPf
                    232: skip \fIi\fP screenfuls and print a screenful of lines
                    233: .PP
                    234: .IP \fIi\|\fPb
                    235: skip back \fIi\fP screenfuls and print a screenful of lines
                    236: .PP
                    237: .IP \fIi\|\fP^B
                    238: same as b
                    239: .PP
                    240: .IP "q or Q"
                    241: Exit from
                    242: .I more.
                    243: .PP
                    244: .IP =
                    245: Display the current line number.
                    246: .PP
                    247: .IP v
                    248: Start up the editor
                    249: .I vi
                    250: at the current line.
                    251: .PP
                    252: .IP h
                    253: Help command; give a description of all the
                    254: .I more
                    255: commands.
                    256: .PP
                    257: .IP \fIi\|\fP/expr
                    258: search for the \fIi\|\fP-th occurrence of the regular expression \fIexpr.\fP
                    259: If there are less than \fIi\fP occurrences of \fIexpr\|\fP,
                    260: and the input is a file (rather than a pipe),
                    261: then the position in the file remains unchanged.
                    262: Otherwise, a screenful is displayed, starting two lines before the place
                    263: where the expression was found.
                    264: The user's erase and kill characters may be used to edit the regular
                    265: expression.
                    266: Erasing back past the first column cancels the search command.
                    267: .PP
                    268: .IP \fIi\|\fPn
                    269: search for the \fIi\|\fP-th occurrence of the last regular expression entered.
                    270: .PP
                    271: .IP \'
                    272: (single quote) Go to the point from which the last search started.
                    273: If no search has been performed in the current file, this command
                    274: goes back to the beginning of the file.
                    275: .PP
                    276: .IP !command
                    277: invoke a shell with \fIcommand\|\fP.
                    278: The characters `%' and `!' in "command" are replaced with the
                    279: current file name and the previous shell command respectively.
                    280: If there is no current file name, `%' is not expanded.
                    281: The sequences "\\%" and "\\!" are replaced by "%" and "!" respectively.
                    282: .PP
                    283: .IP \fIi\|\fP:n
                    284: skip to the \fIi\|\fP-th next file given in the command line
                    285: (skips to last file if n doesn't make sense)
                    286: .PP
                    287: .IP \fIi\|\fP:p
                    288: skip to the \fIi\|\fP-th previous file given in the command line.
                    289: If this command is given in the middle of printing out a
                    290: file, then
                    291: .I more
                    292: goes back to the beginning of the file. If \fIi\fP doesn't make sense,
                    293: .I more
                    294: skips back to the first file.
                    295: If
                    296: .I more
                    297: is not reading from a file, the bell is rung and nothing else happens.
                    298: .PP
                    299: .IP :f
                    300: display the current file name and line number.
                    301: .PP
                    302: .IP ":q or :Q"
                    303: exit from
                    304: .I more
                    305: (same as q or Q).
                    306: .PP
                    307: .IP .
                    308: (dot) repeat the previous command.
                    309: .PP
                    310: The commands take effect immediately, i.e., it is not necessary to
                    311: type a carriage return.
                    312: Up to the time when the command character itself is given,
                    313: the user may hit the line kill character to cancel the numerical
                    314: argument being formed.
                    315: In addition, the user may hit the erase character to redisplay the
                    316: --More--(xx%) message.
                    317: .PP
                    318: At any time when output is being sent to the terminal, the user can
                    319: hit the quit key (normally control\-\\).
                    320: .I More
                    321: will stop sending output, and will display the usual --More--
                    322: prompt.
                    323: The user may then enter one of the above commands in the normal manner.
                    324: Unfortunately, some output is lost when this is done, due to the
                    325: fact that any characters waiting in the terminal's output queue
                    326: are flushed when the quit signal occurs.
                    327: .PP
                    328: The terminal is set to
                    329: .I noecho
                    330: mode by this program so that the output can be continuous.
                    331: What you type will thus not show on your terminal, except for the / and !
                    332: commands.
                    333: .PP
                    334: If the standard output is not a teletype, then
                    335: .I more
                    336: acts just like
                    337: .I cat,
                    338: except that a header is printed before each file (if there is
                    339: more than one).
                    340: .PP
                    341: .DT
                    342: A sample usage of
                    343: .I more
                    344: in previewing
                    345: .I nroff
                    346: output would be
                    347: .PP
                    348:        nroff \-ms +2 doc.n | more -s
                    349: .SH FILES
                    350: .DT
1.4     ! etheisen  351: /usr/share/misc/termcap                Terminal data base
1.3       etheisen  352: .br
1.4     ! etheisen  353: /usr/share/misc/more.help      Help file
1.3       etheisen  354: .SH "SEE ALSO"
                    355: csh(1), man(1), msgs(1), script(1), sh(1), environ(7)
                    356: .SH BUGS
                    357: Skipping backwards is too slow on large files.