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

How can I view a live log on a Linux server, so that I can see new log entries instantly as they are being added?

share|improve this question
up vote 7 down vote accepted

Over the Terminal

In the most simple case:

tail -f /var/log/name-of-logfile-you-want-to-watch

The -f option "follows" the file and will automatically update the view as the file is being updated. For a list of possible log files, you can see this article or just explore them yourself.


Using a GUI log viewer

If you have GNOME as a graphical environment installed, it comes with a log viewer called gnome-system-log. Open it with:

gnome-system-log &

You will find a manual here.

share|improve this answer
    
If there are any other requirements (your question wasn't that specific), just report back. – slhck Jul 29 '11 at 10:37
    
Great answer, thanks. Just one more question, what dose the trail function actually do? – wowpatrick Jul 29 '11 at 11:50
    
tail not trail. tail prints the "tail" of given file :). By default last 10 lines. – Beniamin Jul 29 '11 at 13:03
    
Thanks! Stupid typos! – wowpatrick Jul 29 '11 at 13:16

You can also use less if you're interested in that interface rather than tail.

less /var/log/syslog

and then press Shift-F to scroll to the bottom. Less will watch for more text.

share|improve this answer
    
Press / to search for words – Gaurav Kumar Mar 20 '14 at 20:06

You must log in to answer this question.

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