Linux more command with examples

In this article, we will see Linux more command with examples.

What is more?
Linux more command is used to display contents of file in a console. more is a filter for paging through text one screenful at a time.

Linux more Syntax:

more [options] file...

Options:
-d display help instead of ringing bell
-f count logical rather than screen lines
-l suppress pause after form feed
-c do not scroll, display text and clean line ends
-p do not scroll, clean screen and display text
-s squeeze multiple blank lines into one
-u suppress underlining
the number of lines per screenful
+ display file beginning from line number
+/ display file beginning from search string match

Linux more command examples:

1. To display contents of file /etc/passwd.

more /etc/passwd

Linux more command with examples

Press q to quit from the file.
Press n to go next page of file on your screen
Press b to to back one page of file on your screen

2. To limit the lines displayed per page use more -number. Following command displays 10 lines per page on screen.

more -10 /etc/passwd

Again:
Press q to quit from the file.
Press n to go next page of file on your screen
Press b to to back one page of file on your screen

3. Use -d option to display user message at right corner.

more -d /etc/passwd

4. The +/string name with more command helps to find the string.

more +/r2schools /etc/passwd

5. To display contents of a file from specific line use + symbol and line number.

Following examples displays the contents of file passwd from the line 20 on your screen.

more +20 /etc/passwd