1.\" Copyright (c) 1988, 1990 The Regents of the University of California. 2.\" Copyright (c) 1988 Mark Nudleman 3.\" All rights reserved. 4.\" 5.\" %sccs.include.redist.man% 6.\" 7.\" @(#)more.1 5.12 (Berkeley) 06/11/90 8.\" 9.Dd 10.Dt MORE 1 11.Sh NAME 12.Nm more 13.Nd file perusal filter for crt viewing 14.Sh SYNOPSIS 15.Nm more 16.Op Fl ceinus 17.Op Fl t Ar tag 18.Op Fl x Ar tabs 19.Op Fl / Ar pattern 20.Op Fl # 21.Ar 22.Sh DESCRIPTION 23.Nm More 24is a filter for paging through text one screenful at a time. It 25uses 26.Xr termcap 3 27so it can run on a variety of terminals. There is even limited support 28for hardcopy terminals. (On a hardcopy terminal, lines which should be 29printed at the top of the screen are prefixed with an up-arrow.) 30.Ar File 31may be a single dash (``-''), implying stdin. 32.Sh OPTIONS 33Command line options are described below. 34Options are also taken from the environment variable 35.Ev MORE 36(make sure to precede them with a dash (``-'')) but command 37line options will override them. 38.Tw Fl 39.Tp Fl c 40Normally, 41.Nm more 42will repaint the screen by scrolling from the bottom of the screen. 43If the 44.Fl c 45option is set, when 46.Nm more 47needs to change the entire display, it will paint from the top line down. 48.Tp Fl e 49Normally, if displaying a single file, 50.Nm more 51exits as soon as it reaches end-of-file. The 52.Fl e 53option tells more to 54exit if it reaches end-of-file twice without an intervening operation. 55If the file is shorter than a single screen 56.Nm more 57will exit at end-of-file regardless. 58.Tp Fl i 59The 60.Fl i 61option causes searches to ignore case; that is, 62uppercase and lowercase are considered identical. 63.Tp Fl n 64The 65.Fl n 66flag suppresses line numbers. 67The default (to use line numbers) may cause 68.Nm more 69to run more slowly in some cases, especially with a very large input file. 70Suppressing line numbers with the 71.Fl n 72flag will avoid this problem. 73Using line numbers means: the line number will be displayed in the 74= command, and the v command will pass the current line number to the editor. 75.Tp Fl s 76The 77.Fl s 78option causes 79consecutive blank lines to be squeezed into a single blank line. 80.Tp Fl t 81The 82.Fl t 83option, followed immediately by a tag, will edit the file 84containing that tag. For more information, see the 85.Xr ctags 1 86command. 87.Tp Fl u 88By default, 89.Nm more 90treats backspaces and CR-LF sequences specially. Backspaces which appear 91adjacent to an underscore character are displayed as underlined text. 92Backspaces which appear between two identical characters are displayed 93as emboldened text. CR-LF sequences are compressed to a single linefeed 94character. The 95.Fl u 96option causes backspaces to always be displayed as 97control characters, i.e. as the two character sequence ``^H'', and CR-LF 98to be left alone. 99.Tp Fl x 100The 101.Fl x 102option sets tab stops every 103.Ar N 104positions. The default for 105.Ar N 106is 8. 107.Tp Fl \&/ 108The 109.Fl \&/ 110option specifies a string that will be searched for before 111each file is displayed. 112.Sh COMMANDS 113Interactive commands for 114.Nm more 115are based on 116.Xr vi 1 . 117Some commands may be preceeded by a decimal number, called N in the 118descriptions below. 119In the following descriptions, ^X means control-X. 120.Pp 121.Tw Ic 122.Tp Ic h 123help: display a summary of these commands. 124If you forget all the other commands, remember this one. 125.Tp Cx Ic SPACE 126.Ws 127.Cx or 128.Ws 129.Ic f 130.Ws 131.Cx or 132.Ws 133.Ic \&^F 134.Cx 135Scroll forward N lines, default one window. 136If N is more than the screen size, only the final screenful is displayed. 137.Tp Cx Ic b 138.Ws 139.Cx or 140.Ws 141.Ic \&^B 142.Cx 143Scroll backward N lines, default one window (see option -z below). 144If N is more than the screen size, only the final screenful is displayed. 145.Tp Cx Ic j 146.Ws 147.Cx or 148.Ws 149.Ic RETURN 150.Cx 151Scroll forward N lines, default 1. 152The entire N lines are displayed, even if N is more than the screen size. 153.Tp Ic k 154Scroll backward N lines, default 1. 155The entire N lines are displayed, even if N is more than the screen size. 156.Tp Ic d 157.Ws 158.Cx or 159.Ws 160.Ic \&^D 161.Cx 162Scroll forward N lines, default one half of the screen size. 163If N is specified, it becomes the new default for 164subsequent d and u commands. 165.Tp Ic u 166.Ws 167.Cx or 168.Ws 169.Ic \&^U 170.Cx 171Scroll backward N lines, default one half of the screen size. 172If N is specified, it becomes the new default for 173subsequent d and u commands. 174.Tp Ic g 175Go to line N in the file, default 1 (beginning of file). 176.Tp Ic G 177Go to line N in the file, default the end of the file. 178.Tp Ic p 179.Ws 180.Cx or 181.Ws 182.Ic \&% 183.Cx 184Go to a position N percent into the file. N should be between 0 185and 100. (This works if standard input is being read, but only if 186.Nm more 187has already read to the end of the file. It is always fast, but 188not always useful.) 189.Tp Ic r 190.Ws 191.Cx or 192.Ws 193.Ic \&^L 194.Cx 195Repaint the screen. 196.Tp Ic R 197Repaint the screen, discarding any buffered input. 198Useful if the file is changing while it is being viewed. 199.Tp Ic m 200Followed by any lowercase letter, 201marks the current position with that letter. 202.Tp Ic \&\' 203(Single quote.) 204Followed by any lowercase letter, returns to the position which 205was previously marked with that letter. 206Followed by another single quote, returns to the postion at 207which the last "large" movement command was executed, or the 208beginning of the file if no such movements have occurred. 209All marks are lost when a new file is examined. 210.Tp Cx Ic \&/ 211.Ar pattern 212.Cx 213Search forward in the file for the N-th line containing the pattern. 214N defaults to 1. 215The pattern is a regular expression, as recognized by 216.Xr ed . 217The search starts at the second line displayed. 218.Tp Cx Ic \&? 219.Ar pattern 220.Cx 221Search backward in the file for the N-th line containing the pattern. 222The search starts at the line immediately before the top line displayed. 223.Tp Ic \&/! 224.Ar pattern 225.Cx 226Like /, but the search is for the N-th line 227which does NOT contain the pattern. 228.Tp Ic \&?! 229.Ar pattern 230.Cx 231Like ?, but the search is for the N-th line 232which does NOT contain the pattern. 233.Tp Ic n 234Repeat previous search, for N-th line containing the last pattern 235(or NOT containing the last pattern, if the previous search 236was /! or ?!). 237.Tp Cx Ic E 238.Ws 239.Op Ar filename 240.Cx 241Examine a new file. 242If the filename is missing, the "current" file (see the N and P commands 243below) from the list of files in the command line is re-examined. 244If the filename is a pound sign (#), the previously examined file is 245re-examined. 246.Tp Cx Ic N 247.Ws 248.Cx or 249.Ws 250.Ic \&:n 251.Cx 252Examine the next file (from the list of files given in the command line). 253If a number N is specified (not to be confused with the command N), 254the N-th next file is examined. 255.Tp Cx Ic P 256.Ws 257.Cx or 258.Ws 259.Ic \&:p 260.Cx 261Examine the previous file. 262If a number N is specified, the N-th previous file is examined. 263.Tp Ic \&:t 264Go to supplied tag. 265.Tp Ic v 266Invokes an editor to edit the current file being viewed. 267The editor is taken from the environment variable 268.Ev EDITOR , 269or defaults to 270.Xr vi 1 . 271.Tp Cx Ic \&= 272.Ws 273.Cx or 274.Ws 275.Ic \&^G 276.Cx 277These options print out the number of the file currently being displayed 278relative to the total number of files there are to display, the current 279line number, the current byte number and the total bytes to display, and 280what percentage of the file has been displayed. If 281.Nm more 282is reading from stdin, or the file is shorter than a single screen, some 283of these items may not be available. Note, all of these items reference 284the first byte of the last line displayed on the screen. 285.Tp Cx Ic q 286.Ws 287.Cx or 288.Ws 289.Ic \&:q 290.Ws 291.Cx or 292.Ws 293.Ic ZZ 294.Cx 295Exits 296.Nm more . 297.Tp 298.Sh ENVIRONMENT 299.Nm More 300uses the following environment variables: 301.Ev MORE , 302.Ev EDITOR , 303.Ev SHELL 304and 305.Ev TERM . 306.Sh SEE ALSO 307.Xr ctags 1 , 308.Xr vi 1 309.Sh AUTHOR 310This software is derived from software contributed to Berkeley 311by Mark Nudleman. 312.Sh HISTORY 313.Nm more 314appeared in 3 BSD. 315