LinuxCommandLibrary

more

TLDR

Open a file for paging

$ more [path/to/file]
copy
Start at a specific line
$ more +[line_number] [path/to/file]
copy
Search for a string before displaying
$ more +/[pattern] [path/to/file]
copy
Squeeze multiple blank lines into one
$ more -s [path/to/file]
copy
Set lines per screen
$ more -n [20] [path/to/file]
copy

SYNOPSIS

more [-d] [-l] [-s] [-p] [-c] [-n lines] [+linenum] [+/pattern] [file...]

DESCRIPTION

more is a filter for paging through text one screenful at a time. It displays file contents interactively, allowing forward navigation and searching through the text.
Commands follow vi conventions and can be preceded by numeric arguments. The pager reads from files or standard input, making it useful in pipelines.

PARAMETERS

-d, --silent

Display helpful prompts instead of ringing bell on errors
-l, --logical
Do not pause after lines containing form feed characters
-e, --exit-on-eof
Exit automatically at end of file
-f, --no-pause
Count logical lines rather than screen lines
-p, --print-over
Clear screen before displaying; do not scroll
-c, --clean-print
Paint each screen from top, clearing remainder
-s, --squeeze
Compress multiple consecutive blank lines into one
-u, --plain
Suppress underlining
-n _number_, --lines _number_
Specify number of lines per screenful
+_number_
Start display at specified line number
+/_pattern_
Search for pattern before displaying

INTERACTIVE COMMANDS

Space

Display next screenful
Enter
Display next line
d, ^D
Scroll forward half screen
b, ^B
Skip backward one screenful
/_pattern_
Search forward for pattern
n
Repeat last search
q, Q
Exit
h, ?
Display help
=
Display current line number
v
Open editor at current line
:n
Go to next file
:p
Go to previous file

CAVEATS

The more command is considered primitive compared to less, which offers backward scrolling and more features. Consider using less for most purposes. The MORE environment variable can set default options.

HISTORY

more was written by Eric Shienbrood at UC Berkeley in 1978 and was one of the first screen-oriented utilities. It became a standard Unix pager, though less (written by Mark Nudelman in 1983) has largely superseded it due to additional features.

SEE ALSO

less(1), cat(1), head(1), tail(1)

> TERMINAL_GEAR

Curated for the Linux community

New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

$54.00
Raspberry Pi 5 8GB

Raspberry Pi 5 8GB

$134.50
BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

$239.99
Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community

GMKtec Gaming PC, K11 AMD Ryzen 9 8945HS, 32GB DDR5 RAM 1TB Mini PC Desktop Computer, Oculink, Dual NIC 2.5GbE LAN, HDMI/DisplayPort/USB4*2

GMKtec Gaming PC, K11 AMD Ryzen 9 8945HS, 32GB DDR5 RAM 1TB Mini PC Desktop Computer, Oculink, Dual NIC 2.5GbE LAN, HDMI/DisplayPort/USB4*2

$739.99
KIWITATA 2X Classic SNES USB Controller for PC Gamings, Retro SNES Wired USB Game Emulator Controller for Windows XP 7 8 11 Mac Raspberry Pi

KIWITATA 2X Classic SNES USB Controller for PC Gamings, Retro SNES Wired USB Game Emulator Controller for Windows XP 7 8 11 Mac Raspberry Pi

$16.99
Raspberry Pi 5 8GB

Raspberry Pi 5 8GB

$134.50