{"id":3156,"date":"2019-06-25T13:25:54","date_gmt":"2019-06-25T05:25:54","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=3156"},"modified":"2019-06-25T20:15:15","modified_gmt":"2019-06-25T12:15:15","slug":"nl","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/nl","title":{"rendered":"nl\u547d\u4ee4-\u6dfb\u52a0\u884c\u53f7"},"content":{"rendered":"\n

nl\u547d\u4ee4\u662f\u4e00\u4e2a\u5f88\u597d\u7528\u7684\u7f16\u53f7\u8fc7\u6ee4\u5de5\u5177\u3002\u8be5\u547d\u4ee4\u53ef\u4ee5\u8bfb\u53d6 File \u53c2\u6570\uff08\u7f3a\u7701\u60c5\u51b5\u4e0b\u6807\u51c6\u8f93\u5165\uff09\uff0c\u8ba1\u7b97\u8f93\u5165\u4e2d\u7684\u884c\u53f7\uff0c\u5c06\u8ba1\u7b97\u8fc7\u7684\u884c\u53f7\u5199\u5165\u6807\u51c6\u8f93\u51fa\u3002 <\/p>\n\n\n\n

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

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n
-b<\/td>\u6307\u5b9a\u884c\u53f7\u6307\u5b9a\u7684\u65b9\u5f0f<\/td><\/tr>
-n<\/td>\u5217\u51fa\u884c\u53f7\u8868\u793a\u7684\u65b9\u5f0f<\/td><\/tr>
-w<\/td>\u884c\u53f7\u680f\u4f4d\u7684\u5360\u7528\u7684\u4f4d\u6570<\/td><\/tr>
-p<\/td>\u5728\u903b\u8f91\u5b9a\u754c\u7b26\u5904\u4e0d\u91cd\u65b0\u5f00\u59cb\u8ba1\u7b97\u3002 <\/td><\/tr><\/tbody><\/table>\n\n\n\n

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

\u7528 nl \u5217\u51fa log2.log \u7684\u5185\u5bb9\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# nl log2.log <\/pre>\n\n\n\n

\u7528 nl \u5217\u51fa log2.log \u7684\u5185\u5bb9\uff0c\u7a7a\u672c\u884c\u4e5f\u52a0\u4e0a\u884c\u53f7\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# nl -b a log2.log  <\/pre>\n\n\n\n

\u8ba9\u884c\u53f7\u524d\u9762\u81ea\u52a8\u8865\u4e0a0\uff0c\u7edf\u4e00\u8f93\u51fa\u683c\u5f0f\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# nl -b a -n rz log2.log   <\/pre>\n\n\n\n

\u7a7a\u884c\u4e0d\u663e\u793a\u884c\u53f7\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# nl -b t log2.log <\/pre>\n\n\n\n

\u6dfb\u52a0\u7684\u884c\u53f7\u5728\u53f3\uff1a<\/p>\n\n\n\n

[root@linuxcool~]# nl -n rn log2.log <\/pre>\n","protected":false},"excerpt":{"rendered":"

nl\u547d\u4ee4\u662f\u4e00\u4e2a\u5f88\u597d\u7528\u7684\u7f16\u53f7\u8fc7\u6ee4\u5de5\u5177\u3002\u8be5\u547d\u4ee4\u53ef\u4ee5\u8bfb\u53d6 File \u53c2\u6570\uff08\u7f3a\u7701\u60c5\u51b5\u4e0b\u6807\u51c6\u8f93\u5165\uff09\uff0c\u8ba1\u7b97\u8f93\u5165\u4e2d\u7684\u884c\u53f7\uff0c\u5c06 […]<\/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\/3156"}],"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=3156"}],"version-history":[{"count":9,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3156\/revisions"}],"predecessor-version":[{"id":3566,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3156\/revisions\/3566"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=3156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=3156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=3156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}