>_cmd.script

more

Page through text one screen at a time, forward only

Files

By CMD Script Team · 3 min read · Last updated

SYNTAX
more [OPTIONS] [FILE...]

Options

Command options and flags
FlagDescription
-dShow a helpful prompt ("Press space to continue, q to quit") instead of just a bare colon
-pClear the screen before displaying each page, rather than scrolling
-cPaint each page from the top of the screen rather than scrolling
-sSqueeze multiple adjacent blank lines into a single blank line
+NUMStart displaying at line NUM instead of the beginning of the file

Distribution compatibility

  • Ubuntu
  • Debian
  • Fedora
  • Arch
  • macOS

What it does

more is a simple terminal pager: it displays a file one screen at a time, letting you advance page by page or line by line, but — unlike less — it's traditionally forward-only, with no reliable way to scroll back up once you've moved past a section. It's the historical predecessor to less (whose name is a pun: "less is more"), and while less has effectively replaced it in daily use, more still ships on virtually every Unix-like system.

Beginner examples

  • more file.txt — page through a file, one screen at a time
  • Press Space to advance a full page
  • Press Enter to advance a single line
  • Press q to quit
more /etc/services

Advanced examples

  • Start viewing partway through a file: more +100 access.log
  • Search forward for a pattern while paging: type /pattern then Enter
  • Pipe long command output through more for controlled paging: dmesg | more
  • Squeeze consecutive blank lines while viewing a sparsely-formatted file: more -s file.txt
  • Repaint each page from the top instead of scrolling, useful over slow connections: more -c file.txt
dmesg | more +50

Common mistakes

  • Expecting to scroll backward with b or arrow keys the way you can in less — classic more doesn't support that reliably.
  • Using more in a script expecting non-interactive output — like any pager, it waits for keypresses and will hang a non-interactive script; redirect to a file or use cat instead for scripts.
  • Assuming more's search and navigation are as capable as less's — they're intentionally minimal.
  • Confusing more's prompt (often just a : at the bottom) for an error, when it's simply waiting for the next keypress.

Tips

  • On most modern Linux distributions, more is either symlinked to less or wraps similar functionality, so behavior can vary — check with type more.
  • If you find yourself wanting to scroll backward, just switch to less; there's little reason to fight more's forward-only design.
  • Use more +NUM to jump straight to a line number when you already know roughly where the content of interest starts.

Best practices

  • Prefer less over more for interactive file viewing in day-to-day work — it does everything more does plus backward scrolling and richer search.
  • Reserve more for minimal environments (rescue shells, embedded systems, containers) where less might not be installed but more is guaranteed present.
  • Never rely on more inside non-interactive scripts or CI pipelines; it will block waiting for input that never comes.

Try it yourself

A simulated shell with a sample home directory — experiment freely, nothing leaves your browser. Type help to list supported commands.

Real-world use cases

  • Paging through command output on a minimal or embedded system where less isn't installed.
  • Quickly viewing a file in a rescue environment or a stripped-down container image.
  • Teaching or learning Unix history — understanding why less's name is a joke about more's limitations.

Common interview questions

  • What's the difference between more and less? more is traditionally forward-only paging with limited search, while less supports both forward and backward navigation and richer search, without needing to read the whole file first.
  • Why is less named that way? As a pun on the phrase "less is more," referencing that it improves on more while doing more with less overhead in some respects.
  • Is more still relevant today? Mostly for minimal or legacy environments; less has superseded it for interactive use on virtually all modern systems, though more still ships everywhere for compatibility.

Frequently Asked Questions

How do I move to the next page in more?

Press Space to advance a full page, or Enter to advance a single line. Press q to quit at any time.

Can more scroll backward like less?

Traditional more is forward-only. Some modern implementations add limited backward scrolling, but it's inconsistent across systems — if you need reliable backward movement, use less instead.

Why would I use more instead of less?

In practice you usually wouldn't on a modern system — less is a strict superset of more's functionality. more is mostly encountered for historical reasons, minimal environments, or scripts/muscle memory from older Unix systems.

Does more search text like less does?

Yes, more supports basic forward search with /pattern, though its search and navigation features are more limited than less's.

Cheat sheet

Download a quick-reference cheat sheet for more.