Filters
How to search
  • Plain words find names, texts and examples.
  • "two words" finds the exact phrase.
  • --name or -x finds an option.
  • #word looks only inside commands.
  • @grep finds lessons and labs that use grep.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Put ! before a word to leave it out. OR between words means one of them.
  • ↑ ↓ to move · Enter to open · Esc to close · / to search

more

Show text one screen at a time (the simple, older pager).

Level
Everyday Linux
Group
Text and search
Needs root
No
Package
util-linux

What it does

more shows a file page by page. Space goes to the next page, q quits. It is simpler than less and mostly goes forward only. It exists on every Unix-like system, so you find it in old scripts and documentation.

Use less when you can; use more when it is the only pager on a minimal system.

How to write it

more [OPTIONS] FILE...
COMMAND | more

Main parts

Keys inside more

Space
Next page.
Enter
Next line.
b
One page back (only for files, not pipes).
/pattern
Search forward. n = next match.
=
Show the current line number.
v
Open the file in your editor at the current line.
h
Help.
q
Quit.

Options 14

Most used

-d, --silent
Show "[Press space to continue, 'q' to quit.]" instead of a bell.
-l, --logical
Do not pause at form feed characters (^L).
-e, --exit-on-eof
Exit at the end of the file.
-f, --no-pause
Count logical lines, not screen lines (no wrapping).
-p, --print-over
Clear the screen before each page (no scrolling).
-c, --clean-print
Paint each page from the top, clearing the rest.
-s, --squeeze
Show several empty lines as one.
-u, --plain
Ignore underlining.
-n, --lines n
The number of lines per screen.
-number
Same as --lines.
+number
Start at this line.
+/string
Start at the first match of the string.
-h, --help
Show help.
-V, --version
Show the version.

Examples 11

$ run as a normal user# run as root (or with sudo)

  1. 1Read a file page by page

    more /etc/services

    Space = next page, q = quit.

  2. 2Page through long output

    ps aux | more

    On minimal systems without less.

  3. 3Start at line 100

    more +100 /var/log/messages

    Skips the first 99 lines.

  4. 4Start at the first match of a word

    more +/sshd /var/log/messages

    Jumps to the first line with sshd.

  5. 5Show friendly prompts instead of a beep

    more -d README

    Helpful for people new to the terminal.

  6. 6Squeeze empty lines

    more -s notes.txt

    Several empty lines become one.

  7. 7Show 20 lines per page

    more -20 /etc/passwd

    Useful on small screens or in serial consoles.

  8. 8Page through the environment (Red Hat cheat sheet style)

    env | more

    Classic combination to read a long list.

  9. 9Read several files one after the other

    more /etc/hosts /etc/resolv.conf

    The file name is shown between them; :n goes to the next file.

  10. 10Open the editor from more

    more /etc/fstab
    (press v to open the file in vi at the current line)

    Quick way from reading to editing.

  11. 11Use more as the pager for man (if less is missing)

    PAGER=more man ls

    Any program that uses $PAGER can use more.

Watch out

  • Going back with b does not work when more reads from a pipe.

Tips to remember

  • more = forward only, simple. less = forward and back, search, follow.

Full manual

This page explains the command in simple words. The original manual has every detail.

In your terminal: man more