Linux View / display a logfile in real time on screen

by on October 2, 2007 · 2 comments· last updated at November 1, 2007

Q. I'd like to see my php or apache web server log files in real time. How do I see log file in real time including all incoming logs?

A. You need to use tail command which output the last part of files in real time including all incoming logs to a file.

tail -f file-name command

If your log file name is /var/log/lighttpd/access.log, enter:
tail -f /var/log/lighttpd/access.log

If your php log file name is /var/log/lighttpd/scripts.log, enter
tail -f /var/log/lighttpd/scripts.log

You will get a scrolling view of the /var/log/lighttpd/scripts.log for all incoming entries on screen. To stop simply hit CTRL+C. Please note that you may need to login as root user to view log files.

Updated for accuracy.



You should follow me on twitter here or grab rss feed to keep track of new changes.

Featured Articles:

{ 2 comments… read them below or add one }

1 Rogha December 15, 2009 at 11:14 pm

how do to view this tail -f log.log on a web?

Reply

2 Romero May 7, 2011 at 12:37 pm

not that simple, u must use ajax.

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <kbd> <blockquote> <pre> <a href="" title="">

Tagged as: , , , , , ,

Previous Faq:

Next Faq: