more

more displays a file one screenful at a time. Where cat prints a whole file at once — and a long file scrolls straight past — more shows the first screen, then waits for you before showing the next.

more [options] file...
$ more long-report.txt

Moving through the file #

While more is paused, it is waiting for a keypress:

KeyAction
SpaceShow the next screenful.
ReturnShow the next line.
qQuit.
/Search forward for a string.
hShow the built-in help.

more moves forward through a file. It is the simple, always-available pager — enough for reading something through once.

Options #

OptionEffect
-n, --lines=NUMShow NUM lines per screenful instead of filling the terminal. --number=NUM is the same.
-F, --from-line=NUMBegin displaying at line NUM.
-P, --pattern=STRINGSearch for STRING and begin displaying at the first match.
-e, --exit-on-eofExit automatically at the end of the file, rather than waiting.
-s, --squeezeCollapse runs of blank lines into one.
-u, --plainSuppress underlining in the displayed text.
-p, --print-overClear the screen and print the next page, instead of scrolling.
-c, --clean-printRedraw each page in place, cleaning line ends, instead of scrolling.
-d, --silentWhen an unrecognised key is pressed, show a short hint instead of ringing the terminal bell.
-l, --logicalDo not pause when a line contains a form-feed character.
-f, --no-pauseCount logical lines rather than screen lines when deciding where to pause.

Exit status #

CodeMeaning
0The file was displayed.
1A file could not be opened.

Edit this page