$linuxjunkies
>

more(1)

Display text files one screen at a time with pagination.

UbuntuDebianFedoraArch

Synopsis

more [OPTION]... [FILE]...

Description

more displays the contents of files page by page, pausing after each screen to let you read. It's useful for viewing long files in the terminal without overwhelming your display. Press space to advance, or other keys to navigate.

When multiple files are specified, more displays them sequentially. It automatically detects your terminal height and adjusts pagination accordingly.

Common options

FlagWhat it does
-dDisplay helpful prompt with available commands; shows "(Next file: FILE)"
-fCount logical lines instead of screen lines (for files with long wrapped lines)
-lDon't pause after form-feed characters (^L)
-pSuppress scrolling; clear screen and display from top instead
-cRepaint screen from top instead of scrolling (similar to -p)
-sSqueeze multiple blank lines into a single blank line
-uSuppress underlining of text (useful for terminal compatibility)
+NUMStart displaying at line NUM instead of the beginning
+/PATTERNStart at the first line matching PATTERN

Examples

View system log file page by page with default pagination

more /var/log/syslog

Display passwd file with descriptive prompts and available commands shown

more -d /etc/passwd

Pipe output from another command through more for pagination

cat longfile.txt | more

Start viewing the file at line 50, useful for skipping headers

more +50 largefile.log

Jump to the first line containing ERROR in the log file

more +/ERROR /var/log/app.log

View file while compressing multiple blank lines into single blanks

more -s file.txt

Display three files sequentially, pausing between each

more file1.txt file2.txt file3.txt

Paginate the output of a directory listing

ls -la /home | more

Related commands