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.