more – view file contents page by page

more command
more command

more is a simple pager for viewing files one screen at a time. For more features, use less.

Synopsis

more [OPTIONS] [FILE...]
KeyAction
SpaceNext screen
EnterNext line
bPrevious screen (if supported)
qQuit
/patternSearch forward
nNext search match

Common Options

OptionDescription
-NShow line numbers
-dDisplay help prompts
+NStart at line N
+/patternStart at first match

Examples

View a file

$ more /var/log/syslog
--More--(45%)

Start at specific line

$ more +100 largefile.txt

Start at pattern

$ more +/error /var/log/syslog

View command output

$ ls -la /etc | more
$ cat largefile.txt | more

more vs less

Featuremoreless
Scroll backwardLimitedYes
Search backwardNoYes
Line numbersBasicYes
Follow fileNoYes (+F)
Mark positionsNoYes

Recommendation: Use less — it does everything more does, plus more.

Tips

  • Use less instead: alias more='less'
  • Available everywhere: more is on virtually all Unix systems
  • Simple and fast: Good for quick file viewing
  • Pipe output: command | more for any long output

See Also

  • less — Advanced pager (recommended)
  • cat — Output entire file
  • head — First lines
  • tail — Last lines

Tutorials