{"id":2231,"date":"2019-05-26T01:01:17","date_gmt":"2019-05-25T17:01:17","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=2231"},"modified":"2022-06-10T16:14:25","modified_gmt":"2022-06-10T08:14:25","slug":"tee","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/tee","title":{"rendered":"tee\u547d\u4ee4 – \u8bfb\u53d6\u6807\u51c6\u8f93\u5165\u7684\u6570\u636e"},"content":{"rendered":"\n

tee\u547d\u4ee4\u7684\u529f\u80fd\u662f\u7528\u4e8e\u8bfb\u53d6\u6807\u51c6\u8f93\u5165\u7684\u6570\u636e\uff0c\u5c06\u5176\u5185\u5bb9\u8f6c\u4ea4\u5230\u6807\u51c6\u8f93\u51fa\u8bbe\u5907\u4e2d\uff0c\u540c\u65f6\u4fdd\u5b58\u6210\u6587\u4ef6\u3002<\/p>\n\n\n\n

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

\u5e38\u7528\u53c2\u6570\uff1a<\/strong> <\/p>\n\n\n\n

-a <\/td>\u8ffd\u52a0\u5199\u5165\u64cd\u4f5c<\/td><\/tr>
-i <\/td>\u5ffd\u7565\u4e2d\u65ad\u4fe1\u53f7 <\/td><\/tr>
— help  <\/td>\u67e5\u770b\u5e2e\u52a9\u4fe1\u606f <\/td><\/tr>
— version <\/td>\u663e\u793a\u7248\u672c\u4fe1\u606f <\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

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

\u5c06\u7528\u6237\u8f93\u5165\u7684\u6570\u636e\u540c\u65f6\u5199\u5165\u5230\u4e24\u4e2a\u6587\u4ef6\u4e2d\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# tee file1 file2<\/strong>\nlinuxcool.com<\/strong>\nlinuxcool.com\n^C<\/strong><\/pre>\n\n\n\n

\u6267\u884c\u67d0\u4e2a\u6307\u5b9a\u7684\u547d\u4ee4\uff0c\u5e76\u5c06\u5176\u6267\u884c\u7ed3\u679c\u5373\u8f93\u51fa\u5230\u5c4f\u5e55\uff0c\u53c8\u5199\u5165\u5230\u6587\u4ef6\u4e2d\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# uptime | tee system.txt<\/strong>\n 16:13:43 up  1:38,  1 user,  load average: 0.00, 0.00, 0.00\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

tee\u547d\u4ee4\u7684\u529f\u80fd\u662f\u7528\u4e8e\u8bfb\u53d6\u6807\u51c6\u8f93\u5165\u7684\u6570\u636e\uff0c\u5c06\u5176\u5185\u5bb9\u8f6c\u4ea4\u5230\u6807\u51c6\u8f93\u51fa\u8bbe\u5907\u4e2d\uff0c\u540c\u65f6\u4fdd\u5b58\u6210\u6587\u4ef6\u3002 \u8bed\u6cd5\u683c\u5f0f\uff1atee [ […]<\/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\/2231"}],"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=2231"}],"version-history":[{"count":9,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/2231\/revisions"}],"predecessor-version":[{"id":10264,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/2231\/revisions\/10264"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=2231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=2231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=2231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}