more(1) MPE/iX Shell and Utilities more(1)
______________________________________________________________________
NAME
more -- display files on a page-by-page basis
SYNOPSIS
more [-ceiSs] [-A|-u] [-n number] [-P prompt] [-p command] [-t
tag] [file...]
more [-ceiSs] [-A|-u] [-n number] [-P prompt] [-t tag] [+command]
[file...]
DESCRIPTION
more displays files one page at a time. It obtains the number of
lines per page from the environment or from the -n option. If
the standard output is not a terminal device, the number of lines
per page is infinite.
more displays the files specified by file... (that is, a list of
file names) one at a time. When more finishes displaying one
file, it begins displaying the next one in the list. If you give
- as one of the file names, more reads the standard input at that
point in the sequence.
more allows paging forwards and backwards (if possible) and
searching for strings.
Options
more accepts the following options:
-A causes the display of all characters, including unprintable
ones. Normally unprintable characters are displayed in a
printable format. Further, ANSI escape sequences for dis-
play modes are processed. This option cannot be used with
-u.
-c clears the screen before displaying a new file. If at any
time, the new screen to be displayed does not have any lines
in common with the current screen, more does not scroll, but
instead, redraws the screen one line at a time, starting
from the top. more may ignore this option if the terminal
doesn't support such operations.
-e exits immediately after displaying the last line of the last
file. Normally, if standard output is a terminal device,
more stops after displaying the last line of the last file
and prompts for a new command. If the command that displays
text causes more to reach the end of the file again, more
exits.
-i ignores case during searches.
-n number
specifies the number of lines per page. This overrides any
values obtained from the environment.
1
more(1) MPE/iX Shell and Utilities more(1)
______________________________________________________________________
-P string
sets the prompt that appears at end of each page of text to
string. The default prompt is [filename]. more normally
displays the prompt in STANDOUT mode.
-p command
+command
initially executes the more command on each file. If it exe-
cutes successfully and command is a positioning command such
as a line number or a regular expression search, more dis-
plays the resulting page; otherwise more displays the first
page of the file. If both the -t and -p options are speci-
fied, the -t option is processed first.
-S displays the prompt in normal mode rather than STANDOUT
mode.
-s replaces consecutive empty lines with a single empty line.
-t tag
searches for the named tag and displays the page of text
containing it. See ctags(1) for more information.
-u displays all backspaces as ^H. Normally characterback-
space_(underscore) displays character as underlined and
characterbackspacecharacter displays character as boldfaced.
-u also displays all carriage returns as ^M. This option
cannot be used with -A.
Interactive Commands
more also accepts the following interactive commands.
[n]b
[n]CTRL-B
[n]PgUp
moves backward n lines, with a default of one page. If n is
more than the page size, more displays only the final page.
[n]d
[n]CTRL-D
scrolls forward n lines, with a default of one half of the
page size. If you specify n, it becomes the new default for
subsequent d and u commands.
[n]f
[n]CTRL-F
[n]PgDn
moves forward n lines, with a default of one page. At
end-of-file, more continues with the next file in list, or
exits if the current file is the last one in the list.
[n]G goes to the nth line in the file. If you do not specify n,
more advances to the end of the file.
2
more(1) MPE/iX Shell and Utilities more(1)
______________________________________________________________________
[n]g goes to the nth line in the file, with the default being the
first line of the file.
h displays a summary of interactive commands.
[n]j
[n]SPACE
[n]ENTER
[n]down arrow
scrolls forward n lines, with a default of one line for j,
ENTER, and down arrow and a default of one page for SPACE.
This command displays the entire n lines even if n is more
than the page size. At end-of-file, these commands cause
more to begin displaying the next file in the list, or to
exit if the current file is the last one in the list.
[n]k
[n]up arrow
scrolls backward n lines, with a default of one line. This
command displays the entire n lines even if n is more than
the page size.
mletter
marks the current position with the lowercase letter. When
you view a new file, all previous marks are lost.
[n]N repeats the previous search, but in the opposite direction.
If you specify n, more repeats the search n times.
[n]n repeats the previous search. If you specify n, more repeats
the search n times. For example if there are eight occur-
rences of pattern in the file and /pattern found the second
occurrence then a follow-up command of 5n finds and sets the
current position to the 7th occurrence of pattern.
q
:q
ZZ exits more.
R refreshes the screen and discards any buffered input.
r
CTRL-L
refreshes the screen.
[n]s skips forward n lines (with a default of one line) and dis-
plays one page beginning at that point. If n would cause
less than a full page to be displayed, more displays the
last page in the file.
[n]u
[n]CTRL-U
3
more(1) MPE/iX Shell and Utilities more(1)
______________________________________________________________________
scrolls backward n lines, with a default of one half of the
page size. If you specify n, it becomes the new default for
subsequent d and u commands.
v invokes an editor to edit the current file. more uses the
editor named by the environment variable EDITOR. The
default editor is vi.
'letter
returns to the position marked with letter.
'' returns to the position from which you last issued a move-
ment command of greater than one page or the beginning of
the file if you have issued no such commands.
:e [filename]ENTER
stops viewing the current file and views filename instead.
If you do not specify filename, more returns to the begin-
ning of the current file. If filename is #, more returns to
the last file viewed before the current one.
[n]:n
views the next file from the list given on the command line.
If you specify n, more views the nth next file from the
list.
[n]:p
views the previous file from the list given in the command
line. If you specify n, more views the nth previous file
from the list.
:t tagname
goes to tagname (see ctags(1)).
:w filename
writes the contents of the current file to the file
filename.
!<shell command>
escapes to shell and executes shell command.
=
CTRL-G
displays, where possible, the name of the file currently
being viewed, its number (relative to the total number of
files specified in the command line), the current line num-
ber, the current byte number, the total bytes to display and
what percentage of the file has been displayed.
[n]/[!]pattern
searches forward in the file for the nth line containing
pattern. n defaults to one if not specified. If pattern is
the null regular expression (/), more uses the previous
4
more(1) MPE/iX Shell and Utilities more(1)
______________________________________________________________________
pattern. If the character ! precedes pattern, more searches
for lines that do not contain pattern.
[n]?[!]pattern
searches backward in the file for the nth line containing
pattern. The search begins at the line immediately before
the top line displayed. n defaults to one if not specified.
If pattern is the null regular expression (?), more uses the
previous pattern. If the character ! precedes pattern, more
searches for lines that do not contain pattern.
HOME goes to the first line in the file.
END goes to the last line in the file.
ENVIRONMENT VARIABLES
The following environment variables affect the operation of more:
COLUMNS
contains the maximum number of columns to display on one
line.
EDITOR
contains the name of the editor that the v command invokes.
LINES
contains the number of lines in a page. This value takes
precedence over value from TERM; however, the -n value takes
precedence over the LINES value.
MORE
contains a list of options (from those listed in the
DESCRIPTION section) as they would appear on the command
line. This variable takes preference over the TERM and
LINES variables.
TERM
contains the name of the terminal type.
DIAGNOSTICS
Possible exit status values are:
0 Successful completion.
>0 An error occurred.
Messages
Message: ******** filename: Not a text file ********
Cause: You specified the file filename which was not a text
file.
Action: Specify a text file.
5
more(1) MPE/iX Shell and Utilities more(1)
______________________________________________________________________
Message: Badly constructed regular expression.
Cause: more encountered a syntax error in a regular expres-
sion.
Action: Check the syntax of the regular expression.
Message: Badly formed number in "num"
Cause: You specified an option which requires a numeric argu-
ment, but the argument given was not a valid number.
Action: Provide a valid number as an argument.
Message: cannot create file "filename"
Cause: You attempted to use the :w filename command, but more
was unable to create the file, probably due to the
existence of a file with that name, no space on the
destination device, or inappropriate permissions on the
destination directory.
Action: Check that filename does not already exist, that there
is space on the destination device, and that you have
appropriate permissions on the destination device.
Message: Cannot edit standard input.
Cause: You attempted to use the v command to edit text that
was coming from the standard input stream.
Action: Store the input text in a temporary file and then use
more to view that file. This allows you to edit the
text if necessary.
Message: cannot reopen input file
Cause: You attempted to view a previously viewed file with the
:e command, and when more tried to re-open that file,
it could not, or you attempted to re-open the current
file (due to a R command or the completion of a shell
escape command) and it failed.
Action: Find out what caused the file become unopenable, and
fix the problem.
Message: input file "filename"
Cause: See syserror(3).
Action: See syserror(3).
Message: insufficient memory
Cause: There were not enough free system resources for more to
work properly.
Action: Free up more system resources.
Message: invalid command
Cause: The command argument to -p or + was invalid.
Action: Fix the syntax of command.
Message: interactive terminal inaccessible
Cause: more was unable to open the terminal for input.
Action: Make sure that the standard input is assigned to a ter-
minal.
6
more(1) MPE/iX Shell and Utilities more(1)
______________________________________________________________________
Message: Mark must be a lowercase letter.
Cause: You used the m command to mark a position in the file;
however you attempted to name the mark with a character
other than a lowercase letter.
Action: Use lowercase letters for all mark names.
Message: Missing prompt after -P
Cause: You specified the -P option without providing a prompt
string as an argument.
Action: Provide the missing prompt.
Message: more: system error
Cause: See syserror(3).
Action: See syserror(3).
Message: No match found for regular expression.
Cause: more did not find a match for the specified regular
expression.
Action: Check that the regular expression was entered cor-
rectly.
Message: No remembered regular expression.
Cause: You tried to use a remembered regular expression; how-
ever, there was no remembered regular expression.
Action: Specify the regular expression explicitly.
Message: No such mark
Cause: You attempted to move to a mark using the 'letter com-
mand, but you never defined the mark letter with a
mletter command.
Action: Check the name of the mark to which you intended to
move, and enter the correct name with the ' command, or
define a mark with the name specified.
Message: No tags file present.
Cause: more was unable to open the tags file.
Action: Check that the file tags exists, and that you have
appropriate permissions. If tags does not exist, use
the ctags command to create it.
Message: Number "num": system error
Cause: See syserror(3).
Action: See syserror(3).
Message: Syntax error in word expansion.
Cause: You provided an invalid file name pattern.
Action: Check the pattern and try again.
Message: Tag tagname not found.
Cause: You tried to move to tag tagname, but more could not
find it.
Action: Check to see that you entered tagname correctly.
7
more(1) MPE/iX Shell and Utilities more(1)
______________________________________________________________________
Message: Unknown option "-option"
Cause: You specified an option that is not valid for more.
Action: Check the DESCRIPTION section for a list of valid more
options.
Message: window size too large
Cause: You specified a window size (lines per page) with the -
or -n option that was greater than the number of lines
on the screen (as given by the environment variable
LINE).
Action: Specify a smaller window size.
Message: window size too small
Cause: You specified a window size (lines per page) with the -
or -n option that was less than three.
Action: Specify a window size of at least three lines.
PORTABILITY
POSIX.2. x/OPEN Portability Guide 4.0. All UNIX systems.
The -A, -P, and -S options and the :w and ! commands are exten-
sions to the POSIX standard. The HOME, END, PgDn, PgUp, down
arrow, and up arrow commands are extensions to traditional imple-
mentations of more, available only on terminal types which sup-
port these keys.
MPE/iX NOTES
The current MPE/iX implementation of more converts non-byte
stream files to byte steam files before displaying them. File
characteristics like file code, record size, and so forth are not
preserved by this conversion. The output of more is written as a
byte stream file.
For more information on how the current MPE/iX implementation may
affect the operation of this utility, see Appendix A, MPE/iX
Implementation Considerations.
SEE ALSO
cat(1), ctags(1), vi(1)
8