In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you the use of linux less command paging display tool, I hope you will learn a lot after reading this article, let's discuss it together!
Browse the contents of the text file, use the less command to display the file, PageDown key up page, PageDown key down page, to exit the less program, you should press the Q key.
The role of less is very similar to that of more, except that the less command allows the user to browse the file forward or backward, while the more command can only browse forward.
Syntax format: less [parameters] [file]
Commonly used parameters: coach
-b set the size of the buffer-e when the file display is over, automatically leave-f force to open a special file For example, peripheral codes, directories, and binaries-g marks only the last search keywords-I ignore the case of the search-m displays a percentage similar to the more command-N displays the line number of each line-o saves the less output in the specified file-Q does not use warning tones-s displays continuous null behavior one line-S displays longer content on a single line Do not wrap-x displays the TAB character as a specified number of space characters
Internal operation of the command:
B turn back one page d turn back half a page h display help interface Q exit less command u scroll forward half page y scroll forward space key scroll one page enter scroll one line
Reference example
View the file:
[root@linuxcool ~] # less test.php
Ps views the process information and displays it through less paging:
[root@linuxcool ~] # ps-ef | less
View the command history and display it through less paging:
[root@linuxcool ~] # 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
…… Omit.
Browse multiple files:
[root@linuxcool ~] # less log2018.log log2019.log
When browsing a file, you can also use the: e command to open another file:
[root@linuxcool ~] # less file1
: e file2 has finished reading this article, I believe you have some understanding of using linux's less command paging display tool, want to know more about it, welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.