Monitor Log Files in Real Time using tail
tail Command – Monitor Logs in Real Time
As said, tail command is the most common solution to display a log file in real time. However, the command to display the file has two versions, as illustrated in the below examples.
- In the first example the command tail needs the
-f
argument to follow the content of a file.
sudo tail -f /var/log/apache2/error.log
- The second version of the command is actually a command itself: tailf. You won’t need to use the -f switch because the command is built-in with the -f argument.
sudo tailf /var/log/apache2/error.log
Tagged:
1
Howdy, Stranger!
Categories
- 94 All Categories
- 20 VoIP
- 7 SIP
- 16 asterisk
- 44 Programming
- 1 Nodejs
- 4 javascript
- 19 PHP
- 8 Codeigniter
- 14 database
- 1 UI/UX
- 2 Flutter
- 28 OS
- 26 Linux
- 1 Virtualization
- 1 Android
- 1 Windows
- 2 legal