Super User is a question and answer site for computer enthusiasts and power users. 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

I have a process which logs output to log.txt. If I want to see the process's status in real-time, is there a way to echo that output to stdout instead of opening the log in a text editor and constantly reloading?

share|improve this question
up vote 7 down vote accepted

For a really simple solution at the Terminal:

% tail -f log_file.log

From the tail mainfile (i.e. man tail):

 -f      The -f option causes tail to not stop when end of file is reached,
         but rather to wait for additional data to be appended to the input.
         The -f option is ignored if the standard input is a pipe, but not if
         it is a FIFO.

 -F      The -F option implies the -f option, but tail will also check to see
         if the file being followed has been renamed or rotated.  The file is
         closed and reopened when tail detects that the filename being read
         from has a new inode number.  The -F option is ignored if reading
         from standard input rather than a file.
share|improve this answer

use tail -f to display the end of a file, and "follow" it as it grows.

share|improve this answer


tail -f log.txt

or in a different flavor:

watch tail log.txt
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .