1 .\" Copyright (c) 1988, 1990, 1993
2 .\" The Regents of the University of California. All rights reserved.
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
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.
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
33 .\" @(#)more.1 8.2 (Berkeley) 4/18/94
40 .Nd file perusal filter for crt viewing
51 is a filter for paging through text one screenful at a time. It
54 so it can run on a variety of terminals. There is even limited support
55 for hardcopy terminals. (On a hardcopy terminal, lines which should be
56 printed at the top of the screen are prefixed with an up-arrow.)
58 may be a single dash (``-''), implying stdin.
60 Command line options are described below.
61 Options are also taken from the environment variable
63 (make sure to precede them with a dash (``-'')) but command
64 line options will override them.
69 will repaint the screen by scrolling from the bottom of the screen.
74 needs to change the entire display, it will paint from the top line down.
76 Normally, if displaying a single file,
78 exits as soon as it reaches end-of-file. The
81 exit if it reaches end-of-file twice without an intervening operation.
82 If the file is shorter than a single screen
84 will exit at end-of-file regardless.
88 option causes searches to ignore case; that is,
89 uppercase and lowercase are considered identical.
93 flag suppresses line numbers.
94 The default (to use line numbers) may cause
96 to run more slowly in some cases, especially with a very large input file.
97 Suppressing line numbers with the
99 flag will avoid this problem.
100 Using line numbers means: the line number will be displayed in the
104 command will pass the current line number to the editor.
109 consecutive blank lines to be squeezed into a single blank line.
113 option, followed immediately by a tag, will edit the file
114 containing that tag. For more information, see the
120 treats backspaces and
122 sequences specially. Backspaces which appear
123 adjacent to an underscore character are displayed as underlined text.
124 Backspaces which appear between two identical characters are displayed
127 sequences are compressed to a single linefeed
130 option causes backspaces to always be displayed as
131 control characters, i.e. as the two character sequence ``^H'', and
137 option sets tab stops every
139 positions. The default for
145 option specifies a string that will be searched for before
146 each file is displayed.
148 Interactive commands for
152 Some commands may be preceded by a decimal number, called N in the
154 In the following descriptions, ^X means control-X.
158 Help: display a summary of these commands.
159 If you forget all the other commands, remember this one.
167 Scroll forward N lines, default one window.
168 If N is more than the screen size, only the final screenful is displayed.
169 .It Ic b No or Ic \&^B
170 Scroll backward N lines, default one window (see option -z below).
171 If N is more than the screen size, only the final screenful is displayed.
172 .It Ic j No or Ic RETURN
173 Scroll forward N lines, default 1.
174 The entire N lines are displayed, even if N is more than the screen size.
176 Scroll backward N lines, default 1.
177 The entire N lines are displayed, even if N is more than the screen size.
178 .It Ic d No or Ic \&^D
179 Scroll forward N lines, default one half of the screen size.
180 If N is specified, it becomes the new default for
181 subsequent d and u commands.
182 .It Ic u No or Ic \&^U
183 Scroll backward N lines, default one half of the screen size.
184 If N is specified, it becomes the new default for
185 subsequent d and u commands.
187 Go to line N in the file, default 1 (beginning of file).
189 Go to line N in the file, default the end of the file.
190 .It Ic p No or Ic \&%
191 Go to a position N percent into the file. N should be between 0
192 and 100. (This works if standard input is being read, but only if
194 has already read to the end of the file. It is always fast, but
196 .It Ic r No or Ic \&^L
199 Repaint the screen, discarding any buffered input.
200 Useful if the file is changing while it is being viewed.
202 Followed by any lowercase letter,
203 marks the current position with that letter.
206 Followed by any lowercase letter, returns to the position which
207 was previously marked with that letter.
208 Followed by another single quote, returns to the position at
209 which the last "large" movement command was executed, or the
210 beginning of the file if no such movements have occurred.
211 All marks are lost when a new file is examined.
212 .It Ic \&/ Ns Ar pattern
213 Search forward in the file for the N-th line containing the pattern.
215 The pattern is a regular expression, as recognized by
217 The search starts at the second line displayed.
218 .It Ic \&? Ns Ar pattern
219 Search backward in the file for the N-th line containing the pattern.
220 The search starts at the line immediately before the top line displayed.
221 .It Ic \&/\&! Ns Ar pattern
222 Like /, but the search is for the N-th line
223 which does NOT contain the pattern.
224 .It Ic \&?\&! Ns Ar pattern
225 Like ?, but the search is for the N-th line
226 which does NOT contain the pattern.
228 Repeat previous search, for N-th line containing the last pattern
231 containing the last pattern, if the previous search
233 .It Ic E Ns Op Ar filename
235 If the filename is missing, the "current" file (see the N and P commands
236 below) from the list of files in the command line is re-examined.
237 If the filename is a pound sign (#), the previously examined file is
239 .It Ic N No or Ic \&:n
240 Examine the next file (from the list of files given in the command line).
241 If a number N is specified (not to be confused with the command N),
242 the N-th next file is examined.
243 .It Ic P No or Ic \&:p
244 Examine the previous file.
245 If a number N is specified, the N-th previous file is examined.
249 Invokes an editor to edit the current file being viewed.
250 The editor is taken from the environment variable
254 .It Ic \&= No or Ic \&^G
255 These options print out the number of the file currently being displayed
256 relative to the total number of files there are to display, the current
257 line number, the current byte number and the total bytes to display, and
258 what percentage of the file has been displayed. If
260 is reading from stdin, or the file is shorter than a single screen, some
261 of these items may not be available. Note, all of these items reference
262 the first byte of the last line displayed on the screen.
275 utilizes the following environment variables, if they exist:
278 This variable may be set with favored options to
281 Specify default editor.
283 Current shell in use (normally set by the shell at login time).
285 Specifies terminal type, used by more to get the terminal
286 characteristics necessary to manipulate the screen.
292 This software is derived from software contributed to Berkeley