{"id":125,"date":"2011-06-30T07:41:49","date_gmt":"2011-06-30T07:41:49","guid":{"rendered":"http:\/\/tech.avant.net\/q\/?p=125"},"modified":"2012-12-25T22:40:40","modified_gmt":"2012-12-25T22:40:40","slug":"tail-f","status":"publish","type":"post","link":"https:\/\/tech.avant.net\/q\/tail-f\/","title":{"rendered":"tail -F"},"content":{"rendered":"<p>I would like to follow an error log as errors are written. The GNU tail command support a <em>&#8211;follow<\/em> option that outputs data as a file grows. There&#8217;s also a <em>&#8211;retry<\/em> option that will keep trying to access a file even if it becomes inaccessible (e.g., during log rotation). The <em>-F<\/em> option is equivalent to <em>&#8211;follow=name &#8211;retry<\/em><\/p>\n<p>The tail command can be run in the background to passively monitor error logs, e.g.,<\/p>\n<pre class=\"sh_sh\">\r\n# tail -n0 -F error.log &\r\n[2] 23906\r\n#\r\n... go on working in the shell\r\n# [Thu Jun 30 00:33:28 2011] [error] File does not exist: ...\r\n#\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I would like to follow an error log as errors are written. The GNU tail command support a &#8211;follow option that outputs data as a file grows. There&#8217;s also a &#8211;retry option that will keep trying to access a file even if it becomes inaccessible (e.g., during log rotation). The -F option is equivalent to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[14],"tags":[],"_links":{"self":[{"href":"https:\/\/tech.avant.net\/q\/wp-json\/wp\/v2\/posts\/125"}],"collection":[{"href":"https:\/\/tech.avant.net\/q\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.avant.net\/q\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.avant.net\/q\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.avant.net\/q\/wp-json\/wp\/v2\/comments?post=125"}],"version-history":[{"count":3,"href":"https:\/\/tech.avant.net\/q\/wp-json\/wp\/v2\/posts\/125\/revisions"}],"predecessor-version":[{"id":732,"href":"https:\/\/tech.avant.net\/q\/wp-json\/wp\/v2\/posts\/125\/revisions\/732"}],"wp:attachment":[{"href":"https:\/\/tech.avant.net\/q\/wp-json\/wp\/v2\/media?parent=125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.avant.net\/q\/wp-json\/wp\/v2\/categories?post=125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.avant.net\/q\/wp-json\/wp\/v2\/tags?post=125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}