more
text processingLinux/Unix
The more command is one of the most frequently used commands in Linux/Unix-like operating systems. more Display file content one screen at a time
Quick Reference
Command Name:
more
Category:
text processing
Platform:
Linux/Unix
Basic Usage:
more [options] [arguments]
Common Use Cases
Syntax
more [options] [file...]
Options
Option | Description |
---|---|
-d |
Display "Press space to continue, 'd' to next half page, 'q' to quit" prompt |
-f |
Count logical lines rather than screen lines (for long lines) |
-l |
Ignore form feed (^L) characters for page breaks |
-c |
Clear screen before displaying each page |
-p |
Clear screen before displaying each file |
-s |
Squeeze: multiple blank lines displayed as one |
-u |
Suppress underlining |
+number |
Start displaying at line number |
+/pattern |
Start displaying at first occurrence of pattern |
-number |
Specify screen size in lines |
Key Commands While Viewing:
Key | Action |
---|---|
Space |
Display next page |
Enter |
Display next line |
d or ^D |
Display half a page more |
b or ^B |
Go back one page |
= |
Display current line number |
:f |
Display current filename and line number |
/pattern |
Search forward for pattern |
n |
Search for next occurrence of pattern |
q or Q |
Quit more |
v |
Start an editor at current line (defaults to vi) |
h |
Display help screen |
Examples
How to Use These Examples
The examples below show common ways to use the more
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
more file.txt