Linux more command

  
                  

Name: more

Permissions: All Users

How to use: more [-dlfpcsu] [-num] [+/pattern] [+linenum] [fileNames..]

Description: Similar to cat, but it will be convenient for users to read page by page, and the most basic command is to press the space button to display the next page. Press b. It will be displayed on the back page, and there is also the function to search for strings (similar to vi). For the documentation in use, press h.

Parameters: -num The number of lines displayed at a time

-d prompts the user to display [Press space to continue, 'q' to quit.] at the bottom of the screen, if the user presses the error The key will display [Press 'h' for instructions.] instead of '哔' sound

-l Cancel the function that will pause when the special character ^L (feeding character) is encountered

-f When calculating the number of rows, the actual number of rows, not the number of rows after the automatic line break (some single-line words are too long to be expanded to two or more lines)

-p Instead of displaying each page in a scrolling manner, the screen is cleared first and then the content is displayed.

-c is similar to -p, except that the content is displayed first and then other old data is cleared.

-s When a blank line with more than two consecutive lines is encountered, it is replaced with a blank line of one line

-u The following quotation marks are not displayed (depending on the terminal specified by the environment variable TERM)

+/Search for the pattern before each file is displayed, then start after the string

+num from the num line Display

fileNames The file to display the content, can be a plural number

Example:

more -s testfile The file contents of the testfile are displayed page by page, if there are two consecutive lines The above blank lines are displayed in a blank line.

more +20 testfile Displays the contents of the testfile from line 20.

Copyright © Windows knowledge All Rights Reserved