Concise Linux Command Line notes: less

Source: Internet
Author: User
ArticleDirectory
    • Parameters
    • Option
    • Command
    • Example
    • Tips

Split-screen display of text files

Less [Options] [file-list]

 

Less is similar to more, but more perfect

For example, after a screen of text is displayed, less will display a prompt waiting for the input of the next command; you can browse the file forward or backward; you can call the editor; you can search for a certain mode.

 

Parameters

File-listIs the list of files to view

 

Option

-E (exit) Generally, Q is required to terminate less. This option automatically exits when less 1st encounters the end Of the file

-E (exit) is similar to-E. This option automatically exits when less 2nd times encounters the end of the file.

-M Displays the percentage of browsed parts as a prompt at the bottom of the screen

-N: the row number is displayed at the beginning of each line.

-S: multiple consecutive blank rows are displayed as a separate blank row.

 

Command

Less -- HelpView the command, orLessIn the interaction environmentBy H

He is writing notes, not translating manuals,LessYesMoreEnhanced version, more commands, shit!

 

Example Less-m
20I don't know who is more memorable.21I really can't bear it22End this romantic error demo6%

Display the reading percentage at the bottom

 

Less-n
1919An unforgettable birthday2020I don't know who is more memorable.2121I really can't bear it2222End this romantic error demo

Show row number

 

Tips

To make good use of less, you need to view the less help documentation and then contact me a little. This command is an experienced task and will be added later.

 

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.