Commit | Line | Data |
---|---|---|
bfe13c81 KB |
1 | .\" |
2 | .\" Copyright (c) 1988 Mark Nudleman | |
3 | .\" Copyright (c) 1988 Regents of the University of California. | |
4 | .\" All rights reserved. | |
5 | .\" | |
bfe13c81 KB |
6 | .\" Redistribution and use in source and binary forms are permitted |
7 | .\" provided that the above copyright notice and this paragraph are | |
8 | .\" duplicated in all such forms and that any documentation, | |
9 | .\" advertising materials, and other materials related to such | |
10 | .\" distribution and use acknowledge that the software was developed | |
a942b40b KB |
11 | .\" by Mark Nudleman and the University of California, Berkeley. The |
12 | .\" name of Mark Nudleman or the | |
bfe13c81 KB |
13 | .\" University may not be used to endorse or promote products derived |
14 | .\" from this software without specific prior written permission. | |
15 | .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
16 | .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
17 | .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
18 | .\" | |
00f91e6d | 19 | .\" @(#)more.1 5.11 (Berkeley) %G% |
bfe13c81 | 20 | .\" |
410c1f41 | 21 | .TH MORE 1 |
bfe13c81 | 22 | .SH NAME |
410c1f41 | 23 | more \- file perusal filter for crt viewing |
bfe13c81 | 24 | .SH SYNOPSIS |
098ce2dc | 25 | .B "more [-ceinus] [-t tag] [-x tabs] [-/ pattern] [-#] [file ...]" |
bfe13c81 | 26 | .SH DESCRIPTION |
410c1f41 KB |
27 | .I More |
28 | is a filter for paging through text one screenful at a time. It | |
29 | uses | |
30 | .IR termcap (3) | |
31 | so it can run on a variety of terminals. There is even limited support | |
32 | for hardcopy terminals. (On a hardcopy terminal, lines which should be | |
33 | printed at the top of the screen are prefixed with an up-arrow.) | |
34 | .I File | |
35 | may be a single dash (``-''), implying stdin. | |
36 | .SH OPTIONS | |
37 | Command line options are described below. | |
38 | Options are also taken from the environment variable "MORE" | |
39 | (make sure to precede them with a dash (``-'')) but command | |
40 | line options will override them. | |
41 | .IP -c | |
42 | Normally, | |
bfe13c81 | 43 | .I more |
410c1f41 KB |
44 | will repaint the screen by scrolling from the bottom of the screen. |
45 | If the -c option is set, when | |
46 | .I more | |
47 | needs to change the entire display, it will paint from the top line down. | |
48 | .IP -e | |
00f91e6d | 49 | Normally, if displaying a single file, |
bfe13c81 | 50 | .I more |
410c1f41 | 51 | exits as soon as it reaches end-of-file. The -e option tells more to |
00f91e6d KB |
52 | exit if it reaches end-of-file twice without an intervening operation. |
53 | If the file is shorter than a single screen | |
54 | .I more | |
55 | will exit at end-of-file regardless. | |
410c1f41 KB |
56 | .IP -i |
57 | The -i option causes searches to ignore case; that is, | |
58 | uppercase and lowercase are considered identical. | |
59 | .IP -n | |
60 | The -n flag suppresses line numbers. | |
61 | The default (to use line numbers) may cause | |
62 | .I more | |
63 | to run more slowly in some cases, especially with a very large input file. | |
64 | Suppressing line numbers with the -n flag will avoid this problem. | |
65 | Using line numbers means: the line number will be displayed in the | |
66 | = command, and the v command will pass the current line number to the editor. | |
410c1f41 KB |
67 | .IP -s |
68 | The -s option causes | |
69 | consecutive blank lines to be squeezed into a single blank line. | |
70 | .IP -t | |
71 | The -t option, followed immediately by a tag, will edit the file | |
72 | containing that tag. For more information, see the | |
73 | .IR ctags (1) | |
74 | command. | |
75 | .IP -u | |
dacf700d KB |
76 | By default, |
77 | .I more | |
78 | treats backspaces and CR-LF sequences specially. Backspaces which appear | |
79 | adjacent to an underscore character are displayed as underlined text. | |
80 | Backspaces which appear between two identical characters are displayed | |
81 | as emboldened text. CR-LF sequences are compressed to a single linefeed | |
82 | character. The -u option causes backspaces to always be displayed as | |
83 | control characters, i.e. as the two character sequence ``^H'', and CR-LF | |
84 | to be left alone. | |
410c1f41 KB |
85 | .IP -x |
86 | The -x option sets tab stops every | |
87 | .I N | |
88 | positions. The default for | |
89 | .I N | |
90 | is 8. | |
91 | .IP -/ | |
92 | The -/ option specifies a string that will be searched for before | |
93 | each file is displayed. | |
bfe13c81 | 94 | .SH COMMANDS |
410c1f41 KB |
95 | Interactive commands for |
96 | .I more | |
97 | are based on | |
98 | .IR vi (1). | |
99 | Some commands may be preceeded by a decimal number, called N in the | |
100 | descriptions below. | |
bfe13c81 | 101 | In the following descriptions, ^X means control-X. |
410c1f41 KB |
102 | .IP h |
103 | help: display a summary of these commands. | |
bfe13c81 KB |
104 | If you forget all the other commands, remember this one. |
105 | .PP | |
410c1f41 KB |
106 | .IP "SPACE or f or ^F" |
107 | Scroll forward N lines, default one window. | |
bfe13c81 | 108 | If N is more than the screen size, only the final screenful is displayed. |
bfe13c81 | 109 | .PP |
410c1f41 | 110 | .IP "b or ^B" |
bfe13c81 KB |
111 | Scroll backward N lines, default one window (see option -z below). |
112 | If N is more than the screen size, only the final screenful is displayed. | |
113 | .PP | |
410c1f41 | 114 | .IP "j or RETURN" |
bfe13c81 KB |
115 | Scroll forward N lines, default 1. |
116 | The entire N lines are displayed, even if N is more than the screen size. | |
117 | .PP | |
410c1f41 | 118 | .IP "k" |
bfe13c81 KB |
119 | Scroll backward N lines, default 1. |
120 | The entire N lines are displayed, even if N is more than the screen size. | |
bfe13c81 KB |
121 | .PP |
122 | .IP "d or ^D" | |
123 | Scroll forward N lines, default one half of the screen size. | |
124 | If N is specified, it becomes the new default for | |
125 | subsequent d and u commands. | |
126 | .PP | |
127 | .IP "u or ^U" | |
128 | Scroll backward N lines, default one half of the screen size. | |
129 | If N is specified, it becomes the new default for | |
130 | subsequent d and u commands. | |
131 | .PP | |
410c1f41 | 132 | .IP "g" |
bfe13c81 | 133 | Go to line N in the file, default 1 (beginning of file). |
bfe13c81 | 134 | .PP |
410c1f41 | 135 | .IP "G" |
bfe13c81 | 136 | Go to line N in the file, default the end of the file. |
bfe13c81 KB |
137 | .PP |
138 | .IP "p or %" | |
410c1f41 KB |
139 | Go to a position N percent into the file. N should be between 0 |
140 | and 100. (This works if standard input is being read, but only if | |
141 | .I more | |
142 | has already read to the end of the file. It is always fast, but | |
143 | not always useful.) | |
144 | .PP | |
145 | .IP "r or ^L" | |
146 | Repaint the screen. | |
147 | .PP | |
148 | .IP "R" | |
149 | Repaint the screen, discarding any buffered input. | |
150 | Useful if the file is changing while it is being viewed. | |
bfe13c81 KB |
151 | .PP |
152 | .IP m | |
153 | Followed by any lowercase letter, | |
154 | marks the current position with that letter. | |
155 | .PP | |
156 | .IP "'" | |
157 | (Single quote.) | |
158 | Followed by any lowercase letter, returns to the position which | |
159 | was previously marked with that letter. | |
160 | Followed by another single quote, returns to the postion at | |
148d5db7 KB |
161 | which the last "large" movement command was executed, or the |
162 | beginning of the file if no such movements have occurred. | |
bfe13c81 KB |
163 | All marks are lost when a new file is examined. |
164 | .PP | |
bfe13c81 KB |
165 | .IP /pattern |
166 | Search forward in the file for the N-th line containing the pattern. | |
167 | N defaults to 1. | |
168 | The pattern is a regular expression, as recognized by | |
169 | .I ed. | |
410c1f41 | 170 | The search starts at the second line displayed. |
bfe13c81 KB |
171 | .PP |
172 | .IP ?pattern | |
173 | Search backward in the file for the N-th line containing the pattern. | |
174 | The search starts at the line immediately before the top line displayed. | |
175 | .PP | |
176 | .IP /!pattern | |
177 | Like /, but the search is for the N-th line | |
178 | which does NOT contain the pattern. | |
179 | .PP | |
180 | .IP ?!pattern | |
181 | Like ?, but the search is for the N-th line | |
182 | which does NOT contain the pattern. | |
183 | .PP | |
184 | .IP n | |
185 | Repeat previous search, for N-th line containing the last pattern | |
186 | (or NOT containing the last pattern, if the previous search | |
187 | was /! or ?!). | |
188 | .PP | |
189 | .IP "E [filename]" | |
190 | Examine a new file. | |
191 | If the filename is missing, the "current" file (see the N and P commands | |
192 | below) from the list of files in the command line is re-examined. | |
193 | If the filename is a pound sign (#), the previously examined file is | |
194 | re-examined. | |
195 | .PP | |
bfe13c81 KB |
196 | .IP "N or :n" |
197 | Examine the next file (from the list of files given in the command line). | |
198 | If a number N is specified (not to be confused with the command N), | |
199 | the N-th next file is examined. | |
200 | .PP | |
201 | .IP "P or :p" | |
202 | Examine the previous file. | |
203 | If a number N is specified, the N-th previous file is examined. | |
204 | .PP | |
410c1f41 KB |
205 | .IP ":t" |
206 | Go to supplied tag. | |
bfe13c81 | 207 | .PP |
bfe13c81 KB |
208 | .IP v |
209 | Invokes an editor to edit the current file being viewed. | |
210 | The editor is taken from the environment variable EDITOR, | |
410c1f41 KB |
211 | or defaults to |
212 | .IR vi (1). | |
bfe13c81 | 213 | .PP |
410c1f41 KB |
214 | .IP "= or ^G" |
215 | These options print out the number of the file currently being displayed | |
6d713a99 KB |
216 | relative to the total number of files there are to display, the current |
217 | line number, the current byte number and the total bytes to display, and | |
218 | what percentage of the file has been displayed. If | |
219 | .I more | |
220 | is reading from stdin, or the file is shorter than a single screen, some | |
221 | of these items may not be available. Note, all of these items reference | |
222 | the first byte of the last line displayed on the screen. | |
bfe13c81 | 223 | .PP |
410c1f41 KB |
224 | .IP "q or :q or ZZ" |
225 | Exits | |
bfe13c81 | 226 | .I more. |
410c1f41 KB |
227 | .SH "SEE ALSO |
228 | ctags(1), vi(1) | |
a942b40b | 229 | .SH AUTHOR |
410c1f41 KB |
230 | This software is derived from software contributed to Berkeley |
231 | by Mark Nudleman. |