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
- 83 All Categories
- 15 VoIP
- 7 SIP
- 11 asterisk
- 41 Programming
- 1 Nodejs
- 4 javascript
- 18 PHP
- 8 Codeigniter
- 12 database
- 1 UI/UX
- 2 Flutter
- 25 OS
- 23 Linux
- 1 Virtualization
- 1 Android
- 1 Windows
- 2 legal