more(1)

more(1)

If the standard output is not a terminal device, more always exits when it reaches end-of-®le on the last ®le in its argument list. Otherwise, for all ®les but the last, more prompts, with an indication that it has reached the end of ®le, along with the name of the next ®le. For the last ®le speci®ed, or for the standard input if no ®le is speci®ed, more prompts, indicating end-fo-®le, and accept additional commands. If the next command speci®es forward scrolling, more will exit. If the -eoption is speci®ed, more will exit immediately after writing the last line of the last ®le.

more uses the environment variable MORE to preset any ¯ags desired. The MORE variable thus sets a string containing ¯ags and arguments, preceded with hyphens and blank-character-separated as on the command line. Any command-line ¯ags or arguments are processed after those in the MORE variable, as if the command line were as follows:

more $MORE ¯ags arguments

For example, to view ®les using the -cmode of operation, the shell command sequence

MORE='-c' ; export MORE

or the csh command

setenv MORE -c

causes all invocations of more, including invocations by programs such as man and msgs, to use this mode. The command sequence that sets up the MORE environment variable is usually placed in the .pro®le or

.cshrc ®le.

In the following descriptions, the current position refers to two things:

the position of the current line on the screen

the line number (in the ®le) of the current line on the screen

The line on the screen corresponding to the current position is the third line on the screen. If this is not possible (there are fewer than three lines to display or this is the ®rst page of the ®le, or it is the last page of the ®le), then the current position is either the ®rst or last line on the screen.

Other sequences that can be typed when more pauses, and their effects, are as follows (i is an optional integer argument, defaulting to 1):

i<Return>

ij

i<Ctrl-e>

i<Space> Scroll forward i lines. The default i for <Space> is one screenful; for j and <Return> it is one line. The entire i lines are written, even if i is more than the screen size. At end-of-®le, <Return> causes more to continue with the next ®le in the list, or exits if the current ®le is the last ®le in the list.

id

i<Ctrl-d>Scroll forward i lines, with a default of one half of the screen size. If i is speci®ed, it becomes the new default for subsequent d and u commands.

iu

i<Ctrl-u>Scrolls backward i lines, with a default of one half of the screen size. If i is speci®ed, it becomes the new default for subsequent d and u commands.

ik

i<Ctrl-y>Scrolls backward i lines, with a default of one line. The entire i lines are written, even

 

if i is more than the screen size.

 

iz

Display i more lines and sets the new window (screenful) size to i .

ig

Go to line i in the ®le, with a default of 1 (beginning of ®le). Scroll or rewrite the

 

screen so that the line is at the current position. If i

is not speci®ed, then more

 

displays the ®rst screenful in the ®le.

 

iG

Go to line i in the ®le, with a default of the end of the ®le. If i is not speci®ed, scrolls

 

or rewrites screen so that the last line in the ®le is at the bottom of the screen. If i is

 

speci®ed, scrolls or rewrites the screen so that the line is at the current position.

is

Skip forward i lines, with a default of 1, and write the next screenful beginning at that

 

point. If i would cause the current position to be such that less than one screenful

 

would be written, the last screenful in the ®le is written.

 

HP-UX Release 11i: December 2000

− 3 −

Section 1545

m