Ubuntu – How to view multiple files in single terminal

command linegnome-terminaltail

Sometimes I may need to access multiple log files for troubleshooting , but I don't want to open them in different terminals.

What I want is to open them in same terminal.

Is there any way I can view tail part of the multiple log files in a same terminal window ?

Best Answer

If you have for example /var/log/syslog, /var/log/auth.log log files, you can view them both in one terminal by executing tail -f command .

Open terminal and add the following command:

tail -f /var/log/syslog  /var/log/auth.log

The output:

==> /var/log/syslog <==
Mar  4 17:44:15 client AptDaemon: INFO: Quitting due to inactivity
    Mar  4 17:44:15 client dbus[815]: [system] Activating service name='org.debian.apt' (using servicehelper)


==> /var/log/auth.log <==
Mar  4 16:17:01 client CRON[13628]: pam_unix(cron:session): session opened for user root by (uid=0)
Mar  4 16:17:01 client CRON[13628]: pam_unix(cron:session): session closed for user root