{"id":3151,"date":"2019-06-14T11:57:13","date_gmt":"2019-06-14T03:57:13","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=3151"},"modified":"2019-06-16T12:27:27","modified_gmt":"2019-06-16T04:27:27","slug":"fmt","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/fmt","title":{"rendered":"fmt\u547d\u4ee4 – \u7f16\u6392\u6587\u672c\u6587\u4ef6"},"content":{"rendered":"\n
fmt\u547d\u4ee4\u4f1a\u4ece\u6307\u5b9a\u7684\u6587\u4ef6\u91cc\u8bfb\u53d6\u5185\u5bb9\uff0c\u5c06\u5176\u4f9d\u7167\u6307\u5b9a\u683c\u5f0f\u91cd\u65b0\u7f16\u6392\u540e\uff0c\u8f93\u51fa\u5230\u6807\u51c6\u8f93\u51fa\u8bbe\u5907\u3002\u82e5\u6307\u5b9a\u7684\u6587\u4ef6\u540d\u4e3a”-“\uff0c\u5219fmt\u6307\u4ee4\u4f1a\u4ece\u6807\u51c6\u8f93\u5165\u8bbe\u5907\u8bfb\u53d6\u6570\u636e\u3002<\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>fmt [\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 \u91cd\u6392\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u6587\u4ef6file\u51715\u884c\u6587\u5b57\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u5bf9\u8be5\u6587\u4ef6\u683c\u5f0f\u8fdb\u884c\u91cd\u6392\uff1a<\/p>\n\n\n\n \u5c06\u6587\u4ef6file\u91cd\u65b0\u6392\u621085 \u4e2a\u5b57\u7b26\u4e00\u884c\uff1a<\/p>\n\n\n\n \u8ba9fmt\u7a81\u51fa\u663e\u793a\u7b2c\u4e00\u884c\uff1a<\/p>\n\n\n\n \u7528fmt\u62c6\u5206\u957f\u884c\uff1a<\/p>\n\n\n\n \u5728\u5355\u8bcd\u4e0e\u5355\u8bcd\u4e4b\u95f4\uff0c\u53e5\u5b50\u4e4b\u95f4\u7528\u7a7a\u683c\u5206\u5f00\uff1a<\/p>\n\n\n\n fmt\u547d\u4ee4\u4f1a\u4ece\u6307\u5b9a\u7684\u6587\u4ef6\u91cc\u8bfb\u53d6\u5185\u5bb9\uff0c\u5c06\u5176\u4f9d\u7167\u6307\u5b9a\u683c\u5f0f\u91cd\u65b0\u7f16\u6392\u540e\uff0c\u8f93\u51fa\u5230\u6807\u51c6\u8f93\u51fa\u8bbe\u5907\u3002\u82e5\u6307\u5b9a\u7684\u6587\u4ef6\u540d\u4e3a̶ […]<\/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\/3151"}],"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=3151"}],"version-history":[{"count":5,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3151\/revisions"}],"predecessor-version":[{"id":3252,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3151\/revisions\/3252"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=3151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=3151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=3151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}-c<\/td> \u6bcf\u6bb5\u524d\u4e24\u5217\u7f29\u6392 <\/td><\/tr> -s<\/td> \u53ea\u62c6\u5f00\u5b57\u6570\u8d85\u51fa\u6bcf\u5217\u5b57\u7b26\u6570\u7684\u5217\uff0c\u4f46\u4e0d\u5408\u5e76\u5b57\u6570\u4e0d\u8db3\u6bcf\u5217\u5b57\u7b26\u6570\u7684\u5217 <\/td><\/tr> -t<\/td> \u6bcf\u5217\u524d\u4e24\u5217\u7f29\u6392\uff0c\u4f46\u7b2c1\u5217\u548c\u7b2c2\u5217\u7684\u7f29\u6392\u683c\u5f0f\u4e0d\u540c <\/td><\/tr> -u<\/td> \u6bcf\u4e2a\u5b57\u7b26\u4e4b\u95f4\u90fd\u4ee5\u4e00\u4e2a\u7a7a\u683c\u5b57\u7b26\u95f4\u9694\uff0c\u6bcf\u4e2a\u53e5\u5b50\u4e4b\u95f4\u5219\u4e24\u4e2a\u7a7a\u683c\u5b57\u7b26\u5206\u9694 <\/td><\/tr> -w<\/td> \u8bbe\u7f6e\u6bcf\u5217\u7684\u6700\u5927\u5b57\u7b26\u6570 <\/td><\/tr><\/tbody><\/table>\n\n\n\n [root@linuxcool ~]# fmt file <\/pre>\n\n\n\n
[root@linuxcool ~]# fmt -w 85 file<\/pre>\n\n\n\n
[root@linuxcool ~]# fmt -t file<\/pre>\n\n\n\n
[root@linuxcool ~]# fmt -s file<\/pre>\n\n\n\n
[root@linuxcool ~]# fmt -u file<\/pre>\n","protected":false},"excerpt":{"rendered":"