This question already has an answer here:

I don't understand the function of the option -f added to the tail command.

I know that tail views the "last" part of a file. The manual says that

-f outputs appended data as the file grows

But I don't really understand what that means. I know the meaning of each word in the previous quotation, but I don't understand the meaning of the whole sentence.

marked as duplicate by devnull, user55518, slm Jul 2 '14 at 12:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


It means tail -f command will wait for new strings in the file and show these strings dynamically. This command useful for observing log files .

For example try, tail -f /var/log/messages.


If you have an active log file,program is running while writing info to log file. you can open the log with tail -f so the log is being displayed "live". tail -f /var/log/logfile is like constanly doing tail /var/log/logfile


You can think of -f as "follow". When -f is added to tail, the command will not exit but waits to see if more is added to the file; that additional text will be printed by tail. You normally kill a tail -f with ^c.

It is often used with log files that that are being written by daemons or a background user process.

tail -f /var/log/syslog

Not the answer you're looking for? Browse other questions tagged or ask your own question.