more is a simple pager for viewing files one screen at a time. For more features, use less.
Synopsis
more [OPTIONS] [FILE...]
Navigation
| Key | Action |
|---|
Space | Next screen |
Enter | Next line |
b | Previous screen (if supported) |
q | Quit |
/pattern | Search forward |
n | Next search match |
Common Options
| Option | Description |
|---|
-N | Show line numbers |
-d | Display help prompts |
+N | Start at line N |
+/pattern | Start 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
| Feature | more | less |
|---|
| Scroll backward | Limited | Yes |
| Search backward | No | Yes |
| Line numbers | Basic | Yes |
| Follow file | No | Yes (+F) |
| Mark positions | No | Yes |
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