1 .\" $NetBSD: more.1,v 1.7 2003/02/25 10:34:44 wiz Exp $
3 .\" Copyright (c) 1988, 1990, 1993
4 .\" The Regents of the University of California. All rights reserved.
5 .\" All rights reserved.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
15 .\" 3. Neither the name of the University nor the names of its contributors
16 .\" may be used to endorse or promote products derived from this software
17 .\" without specific prior written permission.
19 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" @(#)more.1 8.2 (Berkeley) 4/18/94
38 .Nd file perusal filter for CRT viewing
50 command is a filter for paging through text one screenful at a time.
53 so it can run on a variety of terminals.
54 There is even limited support for hardcopy terminals.
55 (On a hardcopy terminal, lines which should be printed at the top
56 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.
149 Interactive commands for
153 Some commands may be preceded by a decimal number, called N in the
155 In the following descriptions, ^X means control-X.
159 Help: display a summary of these commands.
160 If you forget all the other commands, remember this one.
168 Scroll forward N lines, default one window.
169 If N is more than the screen size, only the final screenful is displayed.
170 .It Ic b No or Ic \&^B
171 Scroll backward N lines, default one window (see option -z below).
172 If N is more than the screen size, only the final screenful is displayed.
173 .It Ic j No or Ic RETURN
174 Scroll forward N lines, default 1.
175 The entire N lines are displayed, even if N is more than the screen size.
177 Scroll backward N lines, default 1.
178 The entire N lines are displayed, even if N is more than the screen size.
179 .It Ic d No or Ic \&^D
180 Scroll forward N lines, default one half of the screen size.
181 If N is specified, it becomes the new default for
182 subsequent d and u commands.
183 .It Ic u No or Ic \&^U
184 Scroll backward N lines, default one half of the screen size.
185 If N is specified, it becomes the new default for
186 subsequent d and u commands.
188 Go to line N in the file, default 1 (beginning of file).
190 Go to line N in the file, default the end of the file.
191 .It Ic p No or Ic \&%
192 Go to a position N percent into the file. N should be between 0
193 and 100. (This works if standard input is being read, but only if
195 has already read to the end of the file. It is always fast, but
197 .It Ic r No or Ic \&^L
200 Repaint the screen, discarding any buffered input.
201 Useful if the file is changing while it is being viewed.
203 Followed by any lowercase letter,
204 marks the current position with that letter.
207 Followed by any lowercase letter, returns to the position which
208 was previously marked with that letter.
209 Followed by another single quote, returns to the position at
210 which the last "large" movement command was executed, or the
211 beginning of the file if no such movements have occurred.
212 All marks are lost when a new file is examined.
213 .It Ic \&/ Ns Ar pattern
214 Search forward in the file for the N-th line containing the pattern.
216 The pattern is a regular expression, as recognized by
218 The search starts at the second line displayed.
219 .It Ic \&? Ns Ar pattern
220 Search backward in the file for the N-th line containing the pattern.
221 The search starts at the line immediately before the top line displayed.
222 .It Ic \&/\&! Ns Ar pattern
223 Like /, but the search is for the N-th line
224 which does NOT contain the pattern.
225 .It Ic \&?\&! Ns Ar pattern
226 Like ?, but the search is for the N-th line
227 which does NOT contain the pattern.
229 Repeat previous search, for N-th line containing the last pattern
232 containing the last pattern, if the previous search
234 .It Ic E Ns Op Ar filename
236 If the filename is missing, the "current" file (see the N and P commands
237 below) from the list of files in the command line is re-examined.
238 If the filename is a pound sign (#), the previously examined file is
240 .It Ic N No or Ic \&:n
241 Examine the next file (from the list of files given in the command line).
242 If a number N is specified (not to be confused with the command N),
243 the N-th next file is examined.
244 .It Ic P No or Ic \&:p
245 Examine the previous file.
246 If a number N is specified, the N-th previous file is examined.
250 Invokes an editor to edit the current file being viewed.
251 The editor is taken from the environment variable
255 .It Ic \&= No or Ic \&^G
256 These options print out the number of the file currently being displayed
257 relative to the total number of files there are to display, the current
258 line number, the current byte number and the total bytes to display, and
259 what percentage of the file has been displayed.
262 is reading from stdin, or the file is shorter than a single screen, some
263 of these items may not be available. Note, all of these items reference
264 the first byte of the last line displayed on the screen.
278 command uses the following environment variables, if they exist:
281 This variable may be set with favored options to
284 Specify default editor.
286 Current shell in use (normally set by the shell at login time).
288 Specifies terminal type, used by more to get the terminal
289 characteristics necessary to manipulate the screen.
300 This software is derived from software contributed to Berkeley