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