more
View file contents, one screen at a time
TLDR
Open a file
Display a specific line
Go to the next page
Search for a string (press
Exit
Display help about interactive commands
SYNOPSIS
more [options] file...
command | more [options]
PARAMETERS
-d
Displays helpful messages (like '--More--') and prompts at the bottom of the screen.
-f
Counts logical lines, rather than screen lines (i.e., do not fold long lines).
-l
Suppresses processing of form feeds (Ctrl-L or \f).
-p
Do not scroll. Clears the screen before displaying each page of output.
-c
Do not scroll. Clears the screen before displaying each page and redraws each line instead of scrolling.
-s
Squeezes multiple blank lines into a single blank line.
-u
Suppresses underlining.
-number
Specifies the number of lines per screen to display.
+/pattern
Starts displaying the file at the first occurrence of the specified pattern.
+linenumber
Starts displaying the file at the specified linenumber.
DESCRIPTION
The more command is a fundamental Linux utility used to view text files, displaying content one screenful at a time. It's particularly useful for examining large files that exceed the terminal's visible area, preventing content from scrolling past too quickly.
When more reaches the end of a screen, it pauses and waits for user input, allowing for controlled reading. Users can navigate forward through the file by line or by screen, search for specific text patterns, and jump to precise locations within the document. Introduced as one of the earliest pagers for Unix-like systems, more established a standard for interactive file viewing. While still widely available and functional, it has largely been superseded in common usage by the more advanced less command, primarily because more lacks the ability to navigate backward through a file.
CAVEATS
The primary limitation of more is its inability to scroll backward through a file. Once you've moved past a section, you cannot return to it without restarting the command. For this reason, less is generally preferred as it offers full backward and forward navigation, along with many other advanced features.
COMMON INTERACTIVE COMMANDS
While viewing a file with more, several key presses provide interactive control:
- Spacebar: Advances the display by one full screen (page down).
- Enter or Return: Advances the display by one line.
- q or Q: Quits the more command.
- /pattern: Searches forward for the specified pattern.
- n: Repeats the last search for the next occurrence of the pattern.
- h: Displays a help screen with available commands.
- =: Displays the current line number.
- :f: Displays the current file name and line number.
HISTORY
The more command was originally written by Daniel Halbert in 1978 at the University of California, Berkeley. It quickly became a standard utility in Unix-like operating systems, providing a much-needed way to interactively view large text files by pausing at the end of each screen. Before more, users would often have to scroll rapidly through files or use less interactive tools. Its development laid the groundwork for subsequent pagers, most notably less, which improved upon more's functionality by adding backward navigation, leading to its playfully named successor.