[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.5

1.5     ! etheisen    1: .\"    $OpenBSD: more.1,v 1.4 1996/09/28 22:20:48 etheisen Exp $
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.5     ! etheisen   35: .TH MORE 1 "October 14, 1996"
1.3       etheisen   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
1.5     ! etheisen  198: .I More
        !           199: looks in the environment variable
        !           200: .I EDITOR
        !           201: to determine which editor the
        !           202: .I v
        !           203: command invokes.
        !           204: If the editor specified is
        !           205: .I vi
        !           206: or
        !           207: .I ex
        !           208: it will start at the current
        !           209: .I more
        !           210: line number.
        !           211: If no
        !           212: .I EDITOR
        !           213: environment variable is specified the default
        !           214: .I vi
        !           215: editor will be used.
        !           216: .PP
1.3       etheisen  217: If
                    218: .I more
                    219: is reading from a file, rather than a pipe, then a percentage is displayed
                    220: along with the --More-- prompt.
                    221: This gives the fraction of the file (in characters, not lines) that has been
                    222: read so far.
                    223: .PP
                    224: Other sequences which may be typed when
                    225: .I more
                    226: pauses, and their effects, are as follows (\fIi\fP is an optional integer
                    227: argument, defaulting to 1) :
                    228: .PP
                    229: .IP \fIi\|\fP<space>
                    230: display
                    231: .I i
                    232: more lines, (or another screenful if no argument is given)
                    233: .PP
                    234: .IP ^D
                    235: display 11 more lines (a ``scroll'').
                    236: If
                    237: .I i
                    238: is given, then the scroll size is set to \fIi\|\fP.
                    239: .PP
                    240: .IP d
                    241: same as ^D (control-D)
                    242: .PP
                    243: .IP \fIi\|\fPz
                    244: same as typing a space except that \fIi\|\fP, if present, becomes the new
                    245: window size.
                    246: .PP
                    247: .IP \fIi\|\fPs
                    248: skip \fIi\|\fP lines and print a screenful of lines
                    249: .PP
                    250: .IP \fIi\|\fPf
                    251: skip \fIi\fP screenfuls and print a screenful of lines
                    252: .PP
                    253: .IP \fIi\|\fPb
                    254: skip back \fIi\fP screenfuls and print a screenful of lines
                    255: .PP
                    256: .IP \fIi\|\fP^B
                    257: same as b
                    258: .PP
                    259: .IP "q or Q"
                    260: Exit from
                    261: .I more.
                    262: .PP
                    263: .IP =
                    264: Display the current line number.
                    265: .PP
                    266: .IP v
1.5     ! etheisen  267: Starts the editor at the current line number if editor is
1.3       etheisen  268: .I vi
1.5     ! etheisen  269: or
        !           270: .I ex.
        !           271: The environment variable
        !           272: .I EDITOR
        !           273: affects this command according to the rules outlined above.
1.3       etheisen  274: .PP
                    275: .IP h
                    276: Help command; give a description of all the
                    277: .I more
                    278: commands.
                    279: .PP
                    280: .IP \fIi\|\fP/expr
                    281: search for the \fIi\|\fP-th occurrence of the regular expression \fIexpr.\fP
                    282: If there are less than \fIi\fP occurrences of \fIexpr\|\fP,
                    283: and the input is a file (rather than a pipe),
                    284: then the position in the file remains unchanged.
                    285: Otherwise, a screenful is displayed, starting two lines before the place
                    286: where the expression was found.
                    287: The user's erase and kill characters may be used to edit the regular
                    288: expression.
                    289: Erasing back past the first column cancels the search command.
                    290: .PP
                    291: .IP \fIi\|\fPn
                    292: search for the \fIi\|\fP-th occurrence of the last regular expression entered.
                    293: .PP
                    294: .IP \'
                    295: (single quote) Go to the point from which the last search started.
                    296: If no search has been performed in the current file, this command
                    297: goes back to the beginning of the file.
                    298: .PP
                    299: .IP !command
                    300: invoke a shell with \fIcommand\|\fP.
                    301: The characters `%' and `!' in "command" are replaced with the
                    302: current file name and the previous shell command respectively.
                    303: If there is no current file name, `%' is not expanded.
                    304: The sequences "\\%" and "\\!" are replaced by "%" and "!" respectively.
                    305: .PP
                    306: .IP \fIi\|\fP:n
                    307: skip to the \fIi\|\fP-th next file given in the command line
                    308: (skips to last file if n doesn't make sense)
                    309: .PP
                    310: .IP \fIi\|\fP:p
                    311: skip to the \fIi\|\fP-th previous file given in the command line.
                    312: If this command is given in the middle of printing out a
                    313: file, then
                    314: .I more
                    315: goes back to the beginning of the file. If \fIi\fP doesn't make sense,
                    316: .I more
                    317: skips back to the first file.
                    318: If
                    319: .I more
                    320: is not reading from a file, the bell is rung and nothing else happens.
                    321: .PP
                    322: .IP :f
                    323: display the current file name and line number.
                    324: .PP
                    325: .IP ":q or :Q"
                    326: exit from
                    327: .I more
                    328: (same as q or Q).
                    329: .PP
                    330: .IP .
                    331: (dot) repeat the previous command.
                    332: .PP
                    333: The commands take effect immediately, i.e., it is not necessary to
                    334: type a carriage return.
                    335: Up to the time when the command character itself is given,
                    336: the user may hit the line kill character to cancel the numerical
                    337: argument being formed.
                    338: In addition, the user may hit the erase character to redisplay the
                    339: --More--(xx%) message.
                    340: .PP
                    341: At any time when output is being sent to the terminal, the user can
                    342: hit the quit key (normally control\-\\).
                    343: .I More
                    344: will stop sending output, and will display the usual --More--
                    345: prompt.
                    346: The user may then enter one of the above commands in the normal manner.
                    347: Unfortunately, some output is lost when this is done, due to the
                    348: fact that any characters waiting in the terminal's output queue
                    349: are flushed when the quit signal occurs.
                    350: .PP
                    351: The terminal is set to
                    352: .I noecho
                    353: mode by this program so that the output can be continuous.
                    354: What you type will thus not show on your terminal, except for the / and !
                    355: commands.
                    356: .PP
                    357: If the standard output is not a teletype, then
                    358: .I more
                    359: acts just like
                    360: .I cat,
                    361: except that a header is printed before each file (if there is
                    362: more than one).
                    363: .PP
                    364: .DT
                    365: A sample usage of
                    366: .I more
                    367: in previewing
                    368: .I nroff
                    369: output would be
                    370: .PP
                    371:        nroff \-ms +2 doc.n | more -s
                    372: .SH FILES
                    373: .DT
1.4       etheisen  374: /usr/share/misc/termcap                Terminal data base
1.3       etheisen  375: .br
1.4       etheisen  376: /usr/share/misc/more.help      Help file
1.3       etheisen  377: .SH "SEE ALSO"
                    378: csh(1), man(1), msgs(1), script(1), sh(1), environ(7)
                    379: .SH BUGS
                    380: Skipping backwards is too slow on large files.