The more command under Linux is mainly used for split-screen display, that is, the file with more than one screen, which is a little different from the cat command. The following small series will give you a detailed introduction of the more command. If you are interested, you may wish to understand it.
more will be user-friendly display page by page-by-page reading, and basic instruction is to press the space bar (space) started for the next show, press b will go Back (back) one page display, but also the function of searching for strings. The more command reads the file from front to back, so the entire file is loaded at startup.
1. Command format:
more [-dlfpcsu ] [-num ] [+/pattern] [+ linenum] [file . . . ]
2. Command function:
The more command and cat functions are the same as viewing the contents of the file, but the difference is that you can view the contents of the file by page, and also support direct jump lines and other functions.
3. Command parameters:
+n Display from 笫n line
-n Define screen size as n lines
+/pattern Search for this string before each file is displayed (pattern), then start after the first two lines of the string
-c clear the screen from the top, then display
-d prompt “Press space to continue,& rsquo;q’ To quit (press the space bar to continue, press the q key to exit) ”, disable the ring function
-l ignore the Ctrl+l (page change) character
-p by clearing the window instead of Scroll to page a page, similar to the -c option
-s Display multiple consecutive blank lines as one line
-u Remove the lower line in the file contents
4. Common operation commands:
Enter Down n lines, you need to define. The default is 1 line
Ctrl+F Scroll down one screen
Spacebar scrolls down one screen
Ctrl+B Back to previous screen
= Output the line number of the current line
:f Output file name and line number of the current line
V Call vi editor
! Command Call the shell and execute the command
q Exit more
5. Command Example:
Instance 1: Displaying Content from Line 3 in File
Command:
more +3 log2012.log
Output:
[root@localhost test]# cat log2012.log
2012-01
2012-02
2012-03
2012-04-day1
2012-04-day2
2012-04-day3
======[root@localhost test]# more +3 log2012 .log
2012-03
2012-04-day1
2012-04-day2
2012-04-day3
======[root@localhost test]#
Previous12Next page Total 2 pages
CentOS system under the pure-ftpd server connection error message, that is, 530 Login authentication
nodejs installation usually has two ways, many people have used the compiled files to install nodejs
Due to work needs, a user needs to install a Linux server. Since the Ubuntu U disk boot disk has bee
Sometimes it is necessary to know the version number of the database in the Linux s
How to manage modules in the Linux kernel?
Linux implementation of the find command error path has done what to do?
How does Linux use tools to encrypt data?
How to use AWK regular expressions under Linux system
Linux Compile and Install MemcacheQ Method
Ubuntu10.10 configuration R environment method
Linux system uses the command line to execute the php file transfer step
Summary of usage of Linux chmod commands
Linux setitimer function operation skills
Ubuntu system to change the terminal user name to red skills
Microsoft Review 2012 WP Application Development
Win7/Win8.1 users read these 14 articles, you still want to upgrade Win10
How to block ads in Baidu browser mobile version?
Windows 10 users are getting more and more, but the number of Windows 7 users is also growing
How to prevent network intrusion in Windows XP network connection
The computer is not booting properly. Win7 startup repair helps you with
Using shadow copies to restore files or folders in Vista
Win10 really leaks privacy? Win10 leaks the reason and the truth of the truth
What should I do if the Win7 system opens the web page with error code 103?
Linux system Vsftpd server virtual user and passive mode configuration method