Saturday, November 2, 2024
HomeUNIXContinuously 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

Quinn McHenry
Quinn McHenry
Quinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

LATEST REVIEWS

Recent Comments

error: Content is protected !!