{"id":1080,"date":"2013-03-29T20:05:36","date_gmt":"2013-03-29T20:05:36","guid":{"rendered":"http:\/\/invisiblezero.net\/?p=608"},"modified":"2013-03-29T20:05:36","modified_gmt":"2013-03-29T20:05:36","slug":"unix-display-a-logfile-in-real-time-on-screen","status":"publish","type":"post","link":"http:\/\/ndthanh.com\/unix-display-a-logfile-in-real-time-on-screen\/","title":{"rendered":"Unix – display a logfile in real time on screen"},"content":{"rendered":"
<\/p>\n
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?<\/em><\/p>\n
A. You need to use tail command which output the last part of files in real time including all incoming logs to a file.<\/em><\/p><\/blockquote>\n
tail -f file-name command<\/strong><\/p>\n
here are some examples<\/p>\n
<\/p>\n
If your log file name is \/var\/log\/lighttpd\/access.log, enter:<\/p>\n
\ntail -f \/var\/log\/lighttpd\/access.log\n<\/pre>\nIf your php log file name is \/var\/log\/lighttpd\/scripts.log, enter<\/p>\n
\ntail -f \/var\/log\/lighttpd\/scripts.log\n<\/pre>\nYou 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.<\/p>\n","protected":false},"excerpt":{"rendered":"
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…<\/p>\n