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?

2 Answers 2

1

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

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

You must log in to answer this question.