Linux Command details-more command, linux Command details more

Source: Internet
Author: User

Linux Command details-more command, linux Command details more

Like the cat command, the more command in Linux is used to view the file content. This article describes how to use the more command in Linux.

For more information about Linux commands, see the quick query manual for Linux commands.

In Linux, the more command is similar to the cat command. However, the more command is displayed on one page, which makes it easier for users to read on one page.

Press space to display it on the next page. Press B to display it on the back page. Enter/+ strings to search for strings (similar to vi search ).

I. Linux more command syntax

The syntax format of the more command is as follows:

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

Parameters:

Common Parameters for Linux more commands are as follows:

-Num indicates the number of rows displayed at a time.-d indicates the user. [Press space to continue, 'q' to quit.] is displayed at the bottom of the screen. if you Press the wrong key, [Press 'H' for instructions.] is displayed. instead of 'beeps '-l cancels the function that will be paused when a special character ^ L (paper feed character)-f calculates the number of rows with the actual number of rows, rather than the number of rows after the automatic line feed (some rows with too long words will be extended to two or more rows)-p does not show each page in the form of scrolling, instead, the screen is cleared first and then the content-c is similar to-p. The difference is that the content is displayed first and then the other old data-s is cleared. When there are more than two rows in a row, replace the blank line with a line-u with no quotation marks (varies depending on the terminal specified by the Environment Variable TERM) +/pattern searches for the string (pattern) before each document is displayed ), then, the string starts to show + num and starts to display from row num.
Ii. Linux more command to use instances

1) the content of the file1 document is displayed one page at a time. If there are consecutive blank rows, the content is displayed as a blank row.

#more -s file1This is a test file.Welcome to linuxdaxue.com!This is cat command test.

2) The content of the file1 document is displayed from the second line.

#more +2 file1Welcome to linuxdaxue.com!This is cat command test.

3) set the number of lines displayed on each screen

#more -2 file1This is a test file.Welcome to linuxdaxue.com!--More--(64%)

4) use the Pipeline character "|" with other commands

#ls |more -2file1file2--More--
Iii. Common Linux more commands

The following describes several commonly used operation commands for the more command:

Enter down n rows, which need to be defined. The default value is 1 row Ctrl + F scroll down one screen space key scroll down one screen Ctrl + B Return the previous screen = output the row number of the current row: f. The output file name and the row number V call the vi editor! Command to call Shell, and execute command q to exit more

Now, we will introduce the more commands in Linux to you first. For more information about Linux commands, see the quick query manual for Linux commands.

 

  • Copyright:This site's original article, published three months ago by the Linux University (Linuxdaxue.com), contains 1183 words.
  • Reprinted Please note:Linux Command explanation-more command | Linux University

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.