maux
Star on GitHub Buy me a coffee

Manual / more

more(1)

MORE(1) General Commands Manual MORE(1)

more - page through a file

more [ -ceisu ] [ -n lines ] [ file ... ]

More displays the named files (standard input default) on the console a screenful at a time, pausing after each with a --More-- prompt. A single key at the prompt says what to do next; the keys are those of POSIX more, and most take a count typed first. Every line's position is remembered, so the display can also go backward. When standard output is not the console the files are simply copied to it and only -s has any effect.

The options are

Clear the screen before each file rather than scrolling. A full page forward is always painted from the top of a cleared screen; a half page or a counted number of lines scrolls.
Exit when the last line of the last file has been written, instead of prompting there.
Ignore case in searches.
Use lines as the screenful, instead of one less than the console's rows.
Squeeze runs of empty lines to one.
Leave backspaces alone. Without it a character overstruck with itself (as nroff(1) emboldens) is shown bold, and one overstruck with an underscore plain.
Page on the terminal's alternate screen: the screen as it was before more started comes back when it exits, as vi(1) does. Not in POSIX; man(1) uses it, so a manual page leaves no trace.

The commands are

Forward a screenful; with a count, that many lines (f: past the screen, only the last screenful).
Forward one line, or count lines.
Back one line, or count lines.
Forward half a screenful. A count becomes the new half.
Back half a screenful.
Back a screenful, or count lines.
Skip count lines (one by default) and show a screenful.
Go to line count (the first by default).
Go to line count, or to the last screenful.
/pattern
Search forward for the countth line matching the regular expression (the basic regular expressions of ed(1)), and show a screenful starting there. A leading `!' finds a line not matching; an empty pattern repeats the last one.
?pattern
The same, searching backward.
Repeat the last search in the same, or the opposite, direction.
Mark the current position with a lower-case letter.
´letter
Return to that mark; `´´' returns to where the last large movement started.
=, ^G
Show the file name, line number, and how far through the file the display is.
Redraw the screen.
:n, :p
The next, or previous, file named on the command line.
:e file
Examine file.
Edit the current file with vi(1), then continue.
!command
Run command through sh(1).
A summary of the commands.
Quit.

At the end of a file the prompt says so, or names the next file; a forward command then goes on to it, or, after the last file, quits. A file that fits on one screen is shown and more exits. The arrow keys act as k, j, SPACE and b.

where a pipe on standard input is kept while it is paged (xx names the process), removed on exit
the `!' command on its way to the shell

cat(1), sed(1), vi(1), ed(1)

Exit status is 0, or 1 when a file could not be opened, or 2 on a usage error.

A line longer than 255 characters is searched only in its first 255. Bold on the Apple //e's own text page shows as inverse, and inverse lower case is not in that character set; on the UltraTerm it is bright. The line table holds 10000 lines; past that the rest of a file is out of reach.

September 12, 2026 maux