Operations 4 min read

Mastering the Linux “more” Command: Paging, Line Limits, and Advanced Options

This guide explains how to use the Linux more command for paging through long text files, including basic usage, navigating by lines, limiting lines per page, displaying prompts, and preventing automatic scrolling, with clear examples and key shortcuts.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Mastering the Linux “more” Command: Paging, Line Limits, and Advanced Options

Basic Usage of more

In a Linux environment, long text files often need to be viewed page by page. The more command displays a file one screen at a time. more file_name Example: view the kernel log file. more /var/log/dmesg Press the Space key to move to the next screen; the lower‑left corner shows the percentage of the file displayed.

Common Navigation Keys

Space : show the next screen

Enter : scroll down one line

b : go back one screen

q : quit

Start Displaying from a Specific Line

To begin viewing from line N, add +N after the command.

more +100 /var/log/dmesg

Limit the Number of Lines per Page

Use the -N option where N is the number of lines you want per screen.

more -10 /var/log/dmesg

Show Prompt Information

The -d option displays a prompt line with additional information. more -10 -d /var/log/dmesg If an unrecognized key is pressed, more suggests pressing h for help, which then lists all available commands.

Prevent Automatic Scrolling

When you want each page to stay fixed after pressing Space, add the -c option. more -10 -c /var/log/dmesg This forces the display to show only the specified number of lines per page, regardless of how many times Space is pressed.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

terminalcommand-linePagingmore command
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.