{"id":4539,"date":"2019-08-16T23:30:36","date_gmt":"2019-08-16T15:30:36","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=4539"},"modified":"2019-08-16T23:30:50","modified_gmt":"2019-08-16T15:30:50","slug":"tailf","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/tailf","title":{"rendered":"tailf\u547d\u4ee4 – \u8ddf\u8e2a\u6587\u4ef6\u8f93\u51fa"},"content":{"rendered":"\n

tailf\u547d\u4ee4\u51e0\u4e4e\u7b49\u540c\u4e8etail -f\uff0c\u4e25\u683c\u8bf4\u6765\u5e94\u8be5\u4e0etail --follow=name\u66f4\u76f8\u4f3c\u4e9b\u3002\u5f53\u6587\u4ef6\u6539\u540d\u4e4b\u540e\u5b83\u4e5f\u80fd\u7ee7\u7eed\u8ddf\u8e2a\uff0c\u7279\u522b\u9002\u5408\u4e8e\u65e5\u5fd7\u6587\u4ef6\u7684\u8ddf\u8e2a\uff08follow the growth of a log file\uff09\u3002\u4e0etail -f\u4e0d\u540c\u7684\u662f\uff0c\u5982\u679c\u6587\u4ef6\u4e0d\u589e\u957f\uff0c\u5b83\u4e0d\u4f1a\u53bb\u8bbf\u95ee\u78c1\u76d8\u6587\u4ef6\u3002tailf\u7279\u522b\u9002\u5408\u90a3\u4e9b\u4fbf\u643a\u673a\u4e0a\u8ddf\u8e2a\u65e5\u5fd7\u6587\u4ef6\uff0c\u56e0\u4e3a\u5b83\u80fd\u7701\u7535\uff0c\u56e0\u4e3a\u51cf\u5c11\u4e86\u78c1\u76d8\u8bbf\u95ee\u3002<\/p>\n\n\n\n

tailf\u547d\u4ee4\u4e0d\u662f\u4e2a\u811a\u672c\uff0c\u800c\u662f\u4e00\u4e2a\u7528C\u4ee3\u7801\u7f16\u8bd1\u540e\u7684\u4e8c\u8fdb\u5236\u6267\u884c\u6587\u4ef6\uff0c\u67d0\u4e9bLinux\u5b89\u88c5\u4e4b\u540e\u6ca1\u6709\u8fd9\u4e2a\u547d\u4ee4\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>tailf [\u53c2\u6570] [\u6587\u4ef6]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n
-n <\/td>\u8f93\u51fa\u6700\u540e\u6570\u884c <\/td><\/tr>
-NUMBER <\/td>\u4e0eNUMBER\u76f8\u540c <\/td><\/tr>
-V <\/td>\u8f93\u51fa\u7248\u672c\u4fe1\u606f\u5e76\u9000\u51fa <\/td><\/tr>
-h <\/td>\u663e\u793a\u5e2e\u52a9\u5e76\u9000\u51fa <\/td><\/tr><\/tbody><\/table>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u663e\u793a\u6587\u4ef6\u6700\u540e5\u884c\u5185\u5bb9\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# tailf -n 5 log2014.log<\/pre>\n\n\n\n

\u663e\u793a\u6587\u4ef6\u5185\u5bb9\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# tailf log\/WEB.LOG <\/pre>\n","protected":false},"excerpt":{"rendered":"

tailf\u547d\u4ee4\u51e0\u4e4e\u7b49\u540c\u4e8etail -f\uff0c\u4e25\u683c\u8bf4\u6765\u5e94\u8be5\u4e0etail –follow=name\u66f4\u76f8\u4f3c\u4e9b\u3002\u5f53\u6587\u4ef6\u6539\u540d […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4539"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=4539"}],"version-history":[{"count":4,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4539\/revisions"}],"predecessor-version":[{"id":4625,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4539\/revisions\/4625"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=4539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=4539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=4539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}