When using the cat command to view the contents of the file, if the file is too large, as well as using the PgUp+上箭头
key combination can not see the contents of the page up the whole file, which requires the use of more orders.
The more command displays the contents of a text file that can be paged, the user can read the file contents page by page, the basic format of the command is as follows: more [options] filename
The more command is relatively simple, generally do not have any options:
- When -f row count, the actual number of rows, rather than the number of lines after the automatic line feed.
- -p no way scrolling display on each page, but the first clear the screen before displaying content.
- -c with the -p option is similar, except that the first display content and then clear the other old data.
- -s when faced with more than two consecutive lines blank rows, it is replaced with a row of blank lines.
- -u not displayed marks (varies according to the specified terminal TERM environment variable).
- + N n-th row from the start of file contents, n represents a number.
- A number of display lines -n, n is the representative figures.
Execute the command will open a more interactive interface, so readers need to understand some interactive commands:
Interactive instruction | Features |
---|---|
h or? | Display more interactive command command help. |
q or Q | Quit more. |
v | In the current line starts an editor. |
:f | Displays the file name and line number of the current file. |
! <Command> or:! <Command> | In sub Shell to perform the specified command. |
enter | Move down one line. |
space bar | Move down one page. |
Ctrl+l | Refresh the screen. |
= | Display the line number of the current line. |
' | Go to the last place to start the search. |
Ctrf+f | Scroll down the page. |
. | Repeat the last command entered. |
/ String | Specified search string. |
d | Half a page is moved downward. |
b | An upward movement. |
end