The tail command is a good way to see new content in a file, but it is monochrome output. But there is a better way to monitor files. Use the multitail command instead. This will print muticolored output when printing the last few lines of a file.
Install this utility.
sudo apt install multitail |
Then run it to get the newest content in a file.
multitail -c /var/log/dpkg.log |
Below is the output this utility gives you. Very useful for monitoring a logfile for new activity. This will automatically update when the file is updated. Perfect to run in a spare xterm window to monitor a server.
Therefore, this is the best approach for watching an important logfile on Linux.
Running it like this will allow the user to monitor two files at once, this is also very useful.
multitail -u 5 -c /var/log/dpkg.log /var/log/syslog |