{"id":1036,"date":"2019-08-31T14:17:49","date_gmt":"2019-08-31T06:17:49","guid":{"rendered":"http:\/\/www.max-shu.com\/blog\/?p=1036"},"modified":"2019-08-31T14:57:14","modified_gmt":"2019-08-31T06:57:14","slug":"linux%e7%9a%84tee%e5%91%bd%e4%bb%a4%e5%af%bc%e8%87%b4ssh%e5%ae%a2%e6%88%b7%e7%ab%af%e4%b8%8b%e7%9a%84shell%e5%8d%a1%e4%bd%8f%e4%b8%8d%e5%8a%a8","status":"publish","type":"post","link":"http:\/\/www.max-shu.com\/blog\/?p=1036","title":{"rendered":"linux\u7684tee\u547d\u4ee4\u5bfc\u81f4ssh\u5ba2\u6237\u7aef\u4e0b\u7684shell\u5361\u4f4f\u4e0d\u52a8"},"content":{"rendered":"<p>\u5728\u7f16\u8bd1android\u6e90\u4ee3\u7801\u65f6\uff0c\u53d1\u73b0\u6709\u65f6\u5019\u7f16\u4e00\u6bb5\u65f6\u95f4\u540essh\u5ba2\u6237\u7aef\u7684shell\u4f1a\u5361\u4f4f\u4e0d\u52a8\uff0c\u6709\u65f6\u4f1a\u6253\u5370tee write error\uff0c\u6216\u8005tee stand output: resource temperate invalidate \u4e4b\u540e\u9000\u51fa\u7f16\u8bd1\uff0c\u5982\u679c\u7528console\u6765\u8dd1\uff0c\u5219\u4e0d\u4f1a\u963b\u585e\u4e0d\u52a8\u3002<\/p>\n<p>\u5f00\u59cb\u8003\u8651\u662f\u7f51\u7edc\u5bfc\u81f4\uff0c\u4f46\u662f\u7f51\u7edc\u5bfc\u81f4\u7684\u8bdd\uff0c\u4f20\u8f93\u6587\u4ef6\u548c\u4e0d\u8dd1\u7f16\u8bd1\u53eaecho\u6253\u5370\u65f6\u4e0d\u4f1a\u6709\u8fd9\u79cd\u73b0\u8c61\uff0c\u6240\u4ee5\u6700\u591a\u8ddf\u7f51\u7edc\u76f8\u5173\uff0c\u4e0d\u53ef\u80fd\u5b8c\u5168\u7531\u7f51\u7edc\u5bfc\u81f4\u3002<\/p>\n<p>\u8c37\u6b4c\u4e0a\u5230\u5904\u67e5\uff0c\u53d1\u73b0tee\u6709\u4e2aissue\uff08\u89c1\u4e0b\u6587\uff09\uff0c\u6240\u4ee5<span style=\"color: #ff0000;\">\u628a\u7f16\u8bd1\u811a\u672c\u4e2d\u7684tee\u547d\u4ee4\u53bb\u9664\uff0c\u518d\u6765\u6267\u884c\u7f16\u8bd1\uff0c\u8dd1\u4e86\u591a\u6b21\u90fd\u80fd\u987a\u5229\u7f16\u8bd1<\/span>\uff0c\u81f3\u6b64\u95ee\u9898\u89e3\u51b3\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u56e0\u4e3atee\u7684\u8f93\u51fa\u662f\u975e\u963b\u585e\u65b9\u5f0f\uff0c\u5728cpu\u548c\u786c\u76d8io\u592a\u5feb\u7684\u65f6\u5019\uff0c\u53ef\u80fd\u4f1a\u78b0\u5230stdout\u8d44\u6e90\u4e34\u65f6\u65e0\u6548\uff08\u672a\u77e5\u4e3a\u5565\u4f1a\u4e34\u65f6\u65e0\u6548\uff09\uff0c\u8fd9\u65f6\u5c31\u4f1a\u5bfc\u81f4tee\u9000\u51fa\uff08\u5f53\u7136tee\u524d\u9762\u7ba1\u9053\u4e4b\u524d\u7684\u547d\u4ee4\u8fd8\u4f1a\u6267\u884c\u5b8c\uff09\uff0c\u8fdb\u800c\u53ef\u80fdssh\u5ba2\u6237\u7aefshell\u4f1a\u5448\u73b0\u5361\u4f4f\u4e0d\u52a8\u7684\u60c5\u51b5(\u53ef\u7528ctrl+c\u6765\u9000\u51fa\u5f53\u524d\u547d\u4ee4)\u3002<br \/>\n\u76f4\u5230tee 8.5\u4e4b\u540e\u624d\u80fd\u589e\u52a0\u53c2\u6570\u6539\u53d8\u5176\u884c\u4e3a\uff08info coreutils\u547d\u4ee4\u53ef\u4ee5\u67e5\u770b\u5230\u7248\u672c\uff09\uff0c\u628aMODE\u8bbe\u7f6e\u4e3awarn\uff1a<br \/>\n&#8211;output-error[=MODE]\uff0c<br \/>\nMODE determines behavior with write errors on the outputs:<\/p>\n<p>&#8216;warn&#8217; diagnose errors writing to any output<\/p>\n<p>&#8216;warn-nopipe&#8217;\u00a0 diagnose errors writing to any output not a pipe<\/p>\n<p>&#8216;exit&#8217; exit on error writing to any output<\/p>\n<p>&#8216;exit-nopipe&#8217;\u00a0exit on error writing to any output not a pipe<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u7f16\u8bd1android\u6e90\u4ee3\u7801\u65f6\uff0c\u53d1\u73b0\u6709\u65f6\u5019\u7f16\u4e00\u6bb5\u65f6\u95f4\u540essh\u5ba2\u6237\u7aef\u7684shell\u4f1a\u5361\u4f4f\u4e0d\u52a8\uff0c\u6709\u65f6\u4f1a\u6253\u5370tee wr &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[394,767,101,765,766,10],"class_list":["post-1036","post","type-post","status-publish","format-standard","hentry","category-linuxandroid","tag-android","tag-shell","tag-ssh","tag-tee","tag-766","tag-10"],"views":9635,"_links":{"self":[{"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1036","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1036"}],"version-history":[{"count":2,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1036\/revisions"}],"predecessor-version":[{"id":1039,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1036\/revisions\/1039"}],"wp:attachment":[{"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1036"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}