Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

marked as duplicate by devnull, bersch, 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.

up vote 3 down vote accepted

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.

share|improve this answer

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

share|improve this answer

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

share|improve this answer

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