{"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":"

\"logfile\"<\/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>\n

If your php log file name is \/var\/log\/lighttpd\/scripts.log, enter<\/p>\n

\ntail -f \/var\/log\/lighttpd\/scripts.log\n<\/pre>\n

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.<\/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

Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[67,46,53,60,45,66],"tags":[48,49,62,51,64],"aioseo_notices":[],"views":5,"_links":{"self":[{"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/posts\/1080"}],"collection":[{"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/comments?post=1080"}],"version-history":[{"count":0,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/posts\/1080\/revisions"}],"wp:attachment":[{"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/media?parent=1080"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/categories?post=1080"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/tags?post=1080"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}