In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to use Multitail on Linux, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.
The multitail command is useful when you want to view multiple files (especially log files) at the same time. It works similar to the tail-f command in the form of multiple windows. That is, it displays the bottom of these files and the new lines added. Although usually easy to use, multitail provides some command-line and interactive options that you should know before you start using it.
Basic multitail usage
The simplest use of multitail is to list the name of the file you want to view on the command line. This command splits the screen horizontally (that is, the top and bottom) and displays the bottom of each file as well as updates.
$multitail / var/log/syslog / var/log/dmesg
The display will be split like this:
+-- + | +-| +-+
Each file has a line showing the file number (starting at 00), file name, file size, date and time when the latest content was added. Each file will be allocated half the space, regardless of its size and activity. For example:
Content lines from my1.logmore contentmore lines 00] my1.log 59KB-2019-10-14 12:12:09content lines from my2.logmore contentmore lines 01] my2.log 120KB-14:22:29 on 2019-10-14
Please note that if you ask multitail to display non-text files or files that you do not have permission to view, it will not report an error. You just can't see the content.
You can also use wildcards to specify which files to view:
$multitail my*.log
One thing to remember is that multitail will split the screen evenly. If you specify too many files, you will only see the first few lines of the first seven files unless you take additional steps to view the subsequent files (see the scrolling option below). The exact result depends on how many lines are available in the terminal window.
Press Q to exit multitail and return to the normal screen view.
Split the screen
If you prefer, multitail can also split your terminal window vertically (that is, left and right). To do this, use the-s option. If three files are specified, the window on the right side of the screen will be separated horizontally. If you have four files, you will have four windows of equal size.
+-+-+ | | | +-+ +-+-+ | | +-+ +-+ 2 files, 3 files, 4 files
If you want to divide the screen into three columns, use multitail-s 3 file1 file2 file3.
+-+ | | +-+ 3 files scrolling with-s 3 option
You can scroll the file up and down, but you need to press b to select the menu, and then use the up and down arrow buttons to select the file you want to scroll through. Then press enter. You can then use the up and down arrows again to scroll through the lines in the enlarged area. Press Q when you are finished to return to the normal view.
Get help
Pressing h in multitail opens a help menu that describes some basic operations, but the man pages provide more information, and if you don't want to learn more about using this tool, please read it carefully.
By default, multitail is not installed on your system, but using apt-get or yum makes it easy for you to install. The tool provides a lot of functionality, but it is based on characters, and the window border is just a string of Q and x. It is very convenient when you need to pay attention to file updates.
Thank you for reading this article carefully. I hope the article "how to use Multitail on Linux" shared by the editor will be helpful to you. At the same time, I also hope you will support us and follow the industry information channel. More related knowledge is waiting for you to learn!
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.