Continuously Watch a Text File in UNIX

Posted September 5, 2003 by Quinn McHenry in UNIX

Last Updated on

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


About 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.
View more articles by Quinn McHenry

The Conversation

Follow the reactions below and share your own thoughts.

Leave a Reply