One linux command every day (13): less command

Source: Internet
Author: User
Every day, a linux command (13): less command link: A linux command (1): ls command (2): cd command http://www.2cto.com/ OS /201210/163050.html#a linux command every day ..
One linux command every day (13): less command link: One linux command every day (1): ls command http://www.2cto.com/os/201210/163049.html ; One linux command every day (2): cd command http://www.2cto.com/os/201210/163050.html ; One linux command every day (3): pwd command http://www.2cto.com/os/201210/163462.html ; One linux command every day (4): mkdir command http://www.2cto.com/os/201210/163463.html ; One linux command every day (5): rm command http://www.2cto.com/os/201210/163662.html ; One linux command (6) every day: rmdir command http://www.2cto.com/os/201210/164017.html ; One linux command (7) every day: mv command http://www.2cto.com/os/201210/164247.html ; One linux command every day (8): cp command http://www.2cto.com/os/201210/164254.html ; One linux command every day (9): touch Command http://www.2cto.com/os/201211/165699.html ; One linux command every day (10): cat command http://www.2cto.com/os/201211/165989.html ; One linux command every day (11): nl command http://www.2cto.com/os/201211/165990.html One linux command every day (12): more command http://www.2cto.com/os/201211/165994.html The less tool is also a paging display tool for files or other outputs. it should be said that it is an Orthodox linux tool for viewing file content and has extremely powerful functions. The usage of less is more flexible than that of more. At the time of more, we could not flip forward, but we could only look at it later. However, if less is used, you can use the [pageup] [pagedown] and other buttons to access and view the file, making it easier to view the content of a file! In addition, you can have more search functions in less, not only to search down, but also to search up. Www.2cto.com 1. command format: less [parameter] File 2. command function: less is similar to more, but less allows you to browse files at will, while more can only move forward, but cannot move backward, and less does not load the entire file before viewing. 3. command parameters:-B <缓冲区大小> Set the buffer size-e when the file display ends, the system automatically leaves-f to force the special file to open, for example, the peripheral device code, directory, and binary file-g only mark the last search keyword-I ignore the case when the search-m shows the percentage similar to the more command-N shows the row number-o <文件名> Save the less output content in the specified file.-Q does not use the warning sound.-s displays a row of consecutive null behaviors.-S rows are discarded for a long time.-x <数字> Display the "tab" key as a specified number space/string: the function of searching "string" down? String: the function of searching "string" up n: Repeat the previous search (and/or? Related) N: Repeat the previous search (and/or? () B flip one page backward d flip half page h display help interface Q exit less command u scroll forward half page y scroll forward one line space key scroll one line enter key scroll one page [pagedown]: scroll down a page [pageup]: scroll up a page 4. use instance: instance 1: View File command: less log2013.log output: instance 2: ps to view process information and use the less paging display command: ps-ef | less output: instance 3: view command history and Display Command via less paging: history | less output: [root @ localhost test] # history | less 22 scp-r tomcat6.0.32 root@192.168.120.203: /opt/soft 23 cd .. 24 scp-r web root@192.168.120.203:/opt/25 cd soft 26 ls 27 scp-r jdk1.6.0 _ 16/root@192.168.120.203: /opt/soft 28 clear 29 vim/etc/profile 30 vim/etc/profile 31 cd tomcat6.0.32/bin/32 ls 33. /shutdown. sh 34. /startup. sh 35 vim startup. sh 36 ls 37 echo $ JAVA_HOME 38 java 39 ls 40 ls 41 clear 42 cd/opt 43 ls 44 cp apache-tomcat-6.0.32.tar.gz soft/45 ls 46 rm-f apache-tomcat-6.0.32.tar.gz 47 ls 48 cd soft 49 ls 50 tar-vzf apache-tomcat-6.0.32.tar.gz 51 tar-vzfx apache-tomcat-6.0.32.tar.gz 52 tar-zxvf apache-tomcat-6.0.32.tar.gz 53 ls 54 cd apache-tomcat-6.0.32 55 ls 56 cd .. 57 mv apache-tomcat-6.0.32 tomcat6.0.32 58 ls 59 cd tomcat6.0.32/60 ls instance 5: browse multiple files command: Less log2013.log log2014.log output:

Note: After inputting: n, switch to log2014.log input: p and switch to log2013.log5. additional remarks 1. full screen navigation ctrl + F-move one screen forward ctrl + B-move one screen backward ctrl + D-move half screen forward ctrl + U-move half screen backward 2. one-row navigation j-move one row forward k-move one row backward 3. other navigation G-move to the last line g-move to the first line q/ZZ-exit less command 4. other useful commands v-use the configuration editor to edit the current file h-show less help document & pattern-only show matching Mode lines, instead of the entire file 5. tag navigation when you use less to view large files, you can mark any location. you can use commands to navigate to the text location marked with a specific tag: ma-use a to mark the current position of text 'a-navigation to mark

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.