A very useful tool in any kind of troubleshooting is checking out the log files. Whether you’re troubleshooting a system problem, monitoring a mail server or simply checking the visitors for a web server the log files are your best friend. There are a few ways to handle this.
Probably the most common command used to keep an eye on log files is tail. Here are a few examples:
tail -f /var/log/syslog
tail -n25 /var/log/mail.log
tail -F /var/log/lighttpd/error.log
You’ll notice that each command above used a different option