Get the App
SLTechnology News&Howtos  ›  Servers  › 

Linux basic command-more

Shulou Source: shulou.com Published: 2022-06-02 07:33:53 11月10日 Update

More

The content of the long text file is displayed on screen, and the positioning keyword is supported.

The scope of this command: RedHat, RHEL, Ubuntu, CentOS, SUSE, openSUSE, Fedora.

1. Grammar

More [- dlfpcsu] [- num] [+ / pattern] [+ linenum] [file...]

2. List of commands and options

Option

Description

-- version

Display command version information

-- help

Show help documentation

-num

Number of rows displayed per page

-d

Display the description on the last line

-l

It is more common to treat ^ L (form feed) as a special character and pause after any line that contains the form feed. The-l option prevents this behavior.

-f

Only deal with normal lines, not those that are too long

-p

Do not scroll, clear the screen to display text

-c

Do not scroll, clear the screen to show a new page

S

Merge multiple blank lines

-u

Press the underline

+ /

Find a string before display

+ num

Display from line num

After using the more instruction, the screen enters the command mode of more, and we need some commands to see everything.

Command

Description

H |?

Display help information

Space

The following lines are displayed. The default is to scroll one screen.

Z

Show the next k-line text. Default is the current screen size. Parameter becomes the new default.

Enter

Show the following lines, which are one by default

D | ^ D

Scroll a few lines to initialize 11

Q | Q

Quit

S

Skip the first few lines. The default is 1.

F

Skip the first few screens. Default is 1.

B or ^ B

Skip k text screens. The default is 1. Applies only to files, not pipes.

Go to the place where the search started

=

Show current line number

! Or:!

Execute instruction

V

Start the editor on the current line. If the environment variable VISUAL is defined, the editor is obtained from the environment variable; if VISUAL is not defined, it is obtained from EDITOR; if no visualization or editor is defined, the default is "vi".

^ L

Redraw the screen

: n

Jump to the nth file below, default 1

: p

Jump to the previous nth file, default 1

: f

Displays the current file name and line number

.

Repeat the previous command

/ string

Find the string, look at the tail

? String

Look for a string, look for a header

3. Examples

With more, the pipe displays the description of the more instruction at the bottom.

[root@localhost weijie] # less / etc/httpd/conf/httpd.conf

Alsa-info

Alsa-info.sh

Alsaloop

Alsamixer

Amidi

Amixer

AmuFormat.sh

Anthy-agent

-- More-- [Press space to continue,'q' to quit.]

Tags: Commands characters strings files screens messages contents instructions text editors facets lines variables feeds environments pipes forms line numbers processing help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi vpn Linux Shulou Technology Huawei