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.
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/dmesgLimit 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/dmesgShow 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.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
