There are many ways to view contents of a file. Files which content changes very rarely can be viewed using
cat command. Log files are dynamic and their content changes frequently in time. To monitor log files, their content should be watched when it changes. This tutorial shows how to watch a log files in real time in Linux.
tail command can be used to view the lines of a file from the end. The
-f option can be specified to watch a log files in real time. It continuously will display the new lines added to the file.
tail -f /var/log/syslog