Home UNIX Continuously Watch a Text File in UNIX

Continuously Watch a Text File in UNIX

Using the tail command with an option, the file will remain open and you will see any additional output written to the file. This is especially useful for watching log files.

Basic structure of the tail command is like this:
tail -f filename

For example, to monitor any new output to /var/log/messages:

tail -f /var/log/messages

LEAVE A REPLY

Please enter your comment!
Please enter your name here

error: Content is protected !!