{"id":614,"date":"2019-04-27T22:11:41","date_gmt":"2019-04-27T14:11:41","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=614"},"modified":"2022-05-03T19:40:14","modified_gmt":"2022-05-03T11:40:14","slug":"tail","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/tail","title":{"rendered":"tail\u547d\u4ee4 – \u67e5\u770b\u6587\u4ef6\u5c3e\u90e8\u5185\u5bb9"},"content":{"rendered":"\n
tail\u547d\u4ee4\u7684\u529f\u80fd\u662f\u7528\u4e8e\u67e5\u770b\u6587\u4ef6\u5c3e\u90e8\u5185\u5bb9\uff0c\u4f8b\u5982\u9ed8\u8ba4\u4f1a\u5728\u7ec8\u7aef\u754c\u9762\u4e0a\u663e\u793a\u51fa\u6307\u5b9a\u6587\u4ef6\u7684\u672b\u5c3e\u5341\u884c\uff0c\u5982\u679c\u6307\u5b9a\u4e86\u591a\u4e2a\u6587\u4ef6\uff0c\u5219\u4f1a\u5728\u663e\u793a\u7684\u6bcf\u4e2a\u6587\u4ef6\u5185\u5bb9\u524d\u9762\u52a0\u4e0a\u6587\u4ef6\u540d\u6765\u52a0\u4ee5\u533a\u5206\u3002<\/p>\n\n\n\n
\u9ad8\u9636\u73a9\u6cd5\u7684-f\u53c2\u6570\u4f5c\u7528\u662f\u6301\u7eed\u663e\u793a\u6587\u4ef6\u7684\u5c3e\u90e8\u6700\u65b0\u5185\u5bb9\uff0c\u7c7b\u4f3c\u4e8e\u673a\u573a\u5019\u673a\u5385\u7684\u5927\u5c4f\u5e55\uff0c\u603b\u4f1a\u628a\u6700\u65b0\u7684\u6d88\u606f\u5c55\u793a\u7ed9\u7528\u6237\uff0c\u5bf9\u9605\u8bfb\u65e5\u5fd7\u6587\u4ef6\u5c24\u4e3a\u9002\u5408\uff0c\u800c\u4e0d\u9700\u8981\u624b\u52a8\u5237\u65b0\u3002<\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>tail [\u53c2\u6570] \u6587\u4ef6<\/p>\n\n\n\n \u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n \u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n \u9ed8\u8ba4\u663e\u793a\u67d0\u4e2a\u6587\u4ef6\u5c3e\u90e8\u7684\u540e10\u884c\u5185\u5bb9\uff1a<\/p>\n\n\n\n \u6307\u5b9a\u663e\u793a\u67d0\u4e2a\u6587\u4ef6\u5c3e\u90e8\u7684\u540e5\u884c\u5185\u5bb9\uff1a<\/p>\n\n\n\n \u6307\u5b9a\u663e\u793a\u67d0\u4e2a\u6587\u4ef6\u5c3e\u90e8\u7684\u540e15\u4e2a\u5b57\u8282\uff1a<\/p>\n\n\n\n \u6301\u7eed\u5237\u65b0\u663e\u793a\u67d0\u4e2a\u6587\u4ef6\u5c3e\u90e8\u7684\u540e10\u884c\u5185\u5bb9\uff1a<\/p>\n\n\n\n tail\u547d\u4ee4\u7684\u529f\u80fd\u662f\u7528\u4e8e\u67e5\u770b\u6587\u4ef6\u5c3e\u90e8\u5185\u5bb9\uff0c\u4f8b\u5982\u9ed8\u8ba4\u4f1a\u5728\u7ec8\u7aef\u754c\u9762\u4e0a\u663e\u793a\u51fa\u6307\u5b9a\u6587\u4ef6\u7684\u672b\u5c3e\u5341\u884c\uff0c\u5982\u679c\u6307\u5b9a\u4e86\u591a\u4e2a\u6587\u4ef6\uff0c […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/614"}],"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=614"}],"version-history":[{"count":22,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/614\/revisions"}],"predecessor-version":[{"id":9172,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/614\/revisions\/9172"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
-c<\/td>\u8f93\u51fa\u6587\u4ef6\u5c3e\u90e8\u7684N\uff08N\u4e3a\u6574\u6570\uff09\u4e2a\u5b57\u8282\u5185\u5bb9<\/td><\/tr>
-f<\/td>\u6301\u7eed\u663e\u793a\u6587\u4ef6\u6700\u65b0\u8ffd\u52a0\u7684\u5185\u5bb9<\/td><\/tr>
-F <N><\/td>\u4e0e\u9009\u9879\u201c-follow=name\u201d\u548c\u201c--retry”\u8fde\u7528\u65f6\u529f\u80fd\u76f8\u540c <\/td><\/tr>
-n <N><\/td>\u8f93\u51fa\u6587\u4ef6\u7684\u5c3e\u90e8N\uff08N\u4f4d\u6570\u5b57\uff09\u884c\u5185\u5bb9 <\/td><\/tr> --retry<\/td> \u5373\u662f\u5728tail\u547d\u4ee4\u542f\u52a8\u65f6\uff0c\u6587\u4ef6\u4e0d\u53ef\u8bbf\u95ee\u6216\u8005\u6587\u4ef6\u7a0d\u540e\u53d8\u5f97\u4e0d\u53ef\u8bbf\u95ee\uff0c\u90fd\u59cb\u7ec8\u5c1d\u8bd5\u6253\u5f00\u6587\u4ef6\u3002<\/td><\/tr>
--pid=<\u8fdb\u7a0b\u53f7> <\/td>\u4e0e\u201c-f\u201d\u9009\u9879\u8fde\u7528\uff0c\u5f53\u6307\u5b9a\u7684\u8fdb\u7a0b\u53f7\u7684\u8fdb\u7a0b\u7ec8\u6b62\u540e\uff0c\u81ea\u52a8\u9000\u51fatail\u547d\u4ee4 <\/td><\/tr>
--help<\/td>\u663e\u793a\u6307\u4ee4\u7684\u5e2e\u52a9\u4fe1\u606f <\/td><\/tr>
--version <\/td>\u663e\u793a\u6307\u4ee4\u7684\u7248\u672c\u4fe1\u606f <\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n [root@linuxcool ~]# tail initial-setup-ks.cfg <\/strong>\r\n%addon com_redhat_subscription_manager \r\n%end\r\n%addon ADDON_placeholder --disable --reserve-mb=auto\r\n%end\r\n\r\n%anaconda\r\npwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty\r\npwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok\r\npwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty\r\n%end\r<\/pre>\n\n\n\n
[root@linuxcool ~]# tail -n 5 initial-setup-ks.cfg <\/strong>\r\n%anaconda\r\npwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty\r\npwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok\r\npwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty\r\n%end\r<\/pre>\n\n\n\n
[root@linuxcool ~]# tail -c 30 initial-setup-ks.cfg <\/strong>\r\nt --nochanges --notempty\r\n%end\r<\/pre>\n\n\n\n
[root@linuxcool ~]# tail -f \/var\/log\/messages<\/strong>\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026<\/pre>\n","protected":false},"excerpt":{"rendered":"