Combine the results of a CAT and TAC in a single window in Linux

0

I have two log files which I would like to view on my screen simultaneously. Below you can see my commands:

pi@raspberrypi ~ $ watch -n 1 tac /home/pi/log/log.txt
pi@raspberrypi ~ $ watch -n 1 cat /home/pi/log/heartbeat.txt

Do I have to write a program to do that or can I do it through bash?

user414196

Posted 2015-01-31T15:10:28.117

Reputation:

Answers

1

Use a terminal multiplexer like tmux or screen, both of which have a "split screen" mode.

user1686

Posted 2015-01-31T15:10:28.117

Reputation: 283 655

1

You could use multiwatch like this; first update your repo list like this:

sudo apt-get update

Now search the repos for multiwatch to make sure it is available:

apt-cache search multiwatch

Once you have confirmed it’s available to your install of Raspbian on your Raspberry Pi, just install it like this:

sudo apt-get install multiwatch

JakeGould

Posted 2015-01-31T15:10:28.117

Reputation: 38 217