In the Linux system, NL, Cat, TAC and other commands, all at once to display the data on the screen, more commands can be a page by page flipping reading. You can also view the contents of a file by page, and also support functions such as jumping directly to a specified line.
1. Command format:
more [-DLFPCSU] [-num] [+/pattern] [+ linenum] [file ...]
2. Command parameters:
+n starting from Nth line
-N defines the screen size as n rows
+/pattern searches for the string before each file is displayed, and then starts from the first two lines of the string
-C clear the screen from the top and then display
-D hint "press space to continue, ' Q ' To quit (press SPACEBAR to continue, pressing Q key to exit)", disable the ringing function
-L ignores Ctrl+l (page break) characters
-p to page a file by clearing the window instead of scrolling, similar to the-C option
-S displays a contiguous number of empty rows as a row
-U Remove the line from the contents of the file
3. Common Operation Commands:
Enter down n rows, which need to be defined. Default is 1 rows
CTRL+F Scroll down one screen
Space bar scroll down one screen
Ctrl+b Back to previous screen
= Output the line number of the current line
: F immediately displays the file name and the number of rows currently displayed
V Call VI Editor
command to invoke the shell and execute the command
Q Exit More
command example:
1. One page and one page of turn
[Email protected] zdw]# More/etc/man.config # If No catdir is given, it's assumed to being equal to the mandir# His dir have both man1 etc. and CAT1 etc. subdirs). # This is the traditional Unix setup.--more--(16%) That's the point.
A similar display appears when more file content rows are followed by more than the number of lines that are output by the screen. The last row shows the percentage that is currently displayed.
2. Show content from line 2nd
[[email protected] zdw]# cat 123.logabcdefgh[[email protected] zdw]# more +2 123.logbcdefgh
3. Find the first line that appears with a "D" string, and start displaying the output from the previous two lines
[Email protected] zdw]# more +/d 123.log...skippingbcdefgh
4. Set 5 rows per screen
[Email protected] zdw]# more-5/etc/man.config # Generated automatically from man.conf.in by the# configure script.## m An.conf from man-1.6f--more--(2%)
Below shows the ratio of content to the total number of files in the file, press SPACEBAR to display the next 5 lines of content, the percentage will vary with
5. When there is too much content, match and pipe |, use more to page out
[[email protected] zdw]# ls -ltotal 16drwxr-xr-x. 2 root root 4096 apr 19 09:41 1-rw-r--r--.  1 ROOT ROOT   16 APR 19 13:14 123.logdrwxr-xr-x. 2 root root 4096 apr 19 09:41 2drwxr-xr-x. 2 root root 4096 apr 19 09:41 3-rw-r--r--. 1 root root 0 apr 19 13:49 test1-rw-r--r--. 1 Root root 0 apr 19 13:49 test2-rw-r--r--. 1 root root 0 apr 19 13:49 test3-rw-r--r--. 1 root Root 0 apr 19 13:50 test4-rw-r--r--. 1 root root 0 apr 19 13:50 test5[[email protected] zdw]# ls -l|more -3 only 3 lines of content are displayed after using parameters TOTAL 16DRWXR-XR-X. 2 ROOT ROOT 4096 APR 19 09:41 1-rw-r--r--. 1 root root 16 Apr 19 13:14 123.log--more--
Learn from:
Http://www.cnblogs.com/peida/archive/2012/11/02/2750588.html
This article is from the blog "Write to Yourself", so be sure to keep this source http://zhaodongwei.blog.51cto.com/4233742/1765348
Linux More Commands