Command format:
More [options] File
Command function:
View the contents of a file, which can be displayed on a page
Common options:
+n starting from Nth line
-N defines the screen display size to show N rows when viewed
The +/keyword appears from the first two lines of the line that contains the keyword
- C clear the screen from the top and start showing
- D prompt to press space to continue when viewing, press Q to exit
- s displays a contiguous number of empty rows as a row
- v Displays the underline in the contents of the file
Common key operation:
Enter scrolls down n rows, can be defined, default is 1 rows
SPACEBAR scrolls down one screen
ctrl+b scroll up one screen
= Display the current line number
: F Displays the file name and the current line number
v Call VI Editor
Q Exit more
Common examples:
Example one: Starting from the third line of file
Command: More +3 file
Example two: viewing file files and defining 5 rows each time the screen is displayed
Command: more-5 file
Example three: Find the first line in the file that appears with the string "the" and display it from the first two lines of the line
Command: More +/the file
Example four: If there are too many files in the listed directory, you can combine pipe characters with more paging display
Command: Ls-l | more-5
Description: Display 5 files or directory information per page, press space to display the next 5 files or directories
This article is from the "Shiyu" blog, make sure to keep this source http://928004321.blog.51cto.com/10707688/1731209
Linux command —-— more