Maybe there is a log file you check frequently, or you want to watch updates to a log file in real time, as you are working on the server or application. Well, you’re in luck. There is a Linux command especially for that!
You will need to use a secure shell (SSH) session to run this command, though root privileges are not required. To watch a log file (or any file) updated live in real-time, use a modified tail command:
tail -f /path/thefile.log
The result will print any new lines to the shell as they are written to the file.
And that’s it!
This article applies to:

Lightning-fast VPS hosting with enterprise SSD storage, global data centers, and 99.99% uptime. Built for developers, trusted by enterprises.
support@solvps.com
1-888-256-8213
These cookies are essential for the website to function and cannot be switched off.
These cookies enable enhanced functionality and personalization, such as live chat or video.
These cookies help us understand how visitors interact with the website (for example Google Analytics).
These cookies are used to deliver and measure advertising (for example Meta Pixel, LinkedIn Insight, Google Ads).