Home / FreeBSD / How To Tail Multiple Files on UNIX / Linux Console

How To Tail Multiple Files on UNIX / Linux Console

The tail command is one of the best tool to view log files in a real time using tail -f /path/to/log.file syntax on a Unix-like systems. The program MultiTail lets you view one or multiple files like the original tail program. The difference is that it creates multiple windows on your console (with ncurses). This is one of those dream come true program for UNIX sys admin job. You can browse through several log files at once and do various operations like search for errors and more.

Install MultiTail On a Linux

Type the following command under Debian / Ubuntu Linux:

sudo apt-get update
sudo apt-get install multitail

RHEL/CentOS/Fedora/ :

yum install multitail

If you are using FreeBSD 10, enter:

pkg upgrade
pkg install multitail

How To View Multiple Files

To view /var/log/messages and /var/log/auth.log, enter:

multitail /var/log/messages /var/log/auth.log 

How do I display 3 logfiles in 2 columns?

multitail -s 2 /var/log/secure /var/log/fail2ban.log /var/log/messages 

log

multitail has many other useful options. Please read man page for further details:

man multitail
[sz-gplus-post]

About panev

Check Also

KVM виртуализация старт на virt-manager грешка

KVM виртуализация старт на virt-manager грешка Днес се наложи да инсталирам на CentOS 6.8 KVM …