{"id":500,"date":"2020-08-22T05:16:14","date_gmt":"2020-08-22T05:16:14","guid":{"rendered":"http:\/\/feellikelearning.com\/?p=500"},"modified":"2020-11-27T09:06:56","modified_gmt":"2020-11-27T09:06:56","slug":"cn-how-to-log-command-line-out-put-into-a-file","status":"publish","type":"post","link":"https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/","title":{"rendered":"\u600e\u6837\u628a\u547d\u4ee4\u884c\u8f93\u51fa\u5199\u5165\u6587\u4ef6 \uff5chow to log command line out put into a file"},"content":{"rendered":"\n<p>\u5982\u679c\u4e0d\u9700\u8981\u5c4f\u5e55\u540c\u65f6\u8f93\u51fa\uff0c\u53ef\u4ee5\u7528 &#8220;>&#8221;<\/p>\n\n\n\n<!--more-->\n\n\n\n<pre class=\"wp-block-code\"><code>ls > out<\/code><\/pre>\n\n\n\n<p>\u6ce8\u610f &gt; \u53ea\u4f1a\u5199\u5165 stdout \u800c stderr\u53ea\u4f1a\u663e\u793a\u5728\u5c4f\u5e55\u4e0a\uff0c\u5982\u679c\u60f3\u628astderr\u4e00\u8d77log\u4e86\uff0c\u53ef\u4ee5<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls 2>&amp;1 > out<\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u60f3\u4fdd\u6301\u5c4f\u5e55\u8f93\u51fa\uff0c\u540c\u65f6\u8bb0\u5f55\u5230\u6587\u4ef6\u91cc\u9762\uff0c\u53ef\u4ee5\u7528tee\u547d\u4ee4<\/p>\n\n\n\n<p>ls 2&gt;&amp;1 | tee<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c\u4e0d\u9700\u8981\u5c4f\u5e55\u540c\u65f6\u8f93\u51fa\uff0c\u53ef\u4ee5\u7528 &#8220;>&#8221;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.10 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u600e\u6837\u628a\u547d\u4ee4\u884c\u8f93\u51fa\u5199\u5165\u6587\u4ef6 \uff5chow to log command line out put into a file | Feel Like Learning<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u600e\u6837\u628a\u547d\u4ee4\u884c\u8f93\u51fa\u5199\u5165\u6587\u4ef6 \uff5chow to log command line out put into a file | Feel Like Learning\" \/>\n<meta property=\"og:description\" content=\"\u5982\u679c\u4e0d\u9700\u8981\u5c4f\u5e55\u540c\u65f6\u8f93\u51fa\uff0c\u53ef\u4ee5\u7528 &#8220;&gt;&#8221;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/\" \/>\n<meta property=\"og:site_name\" content=\"Feel Like Learning\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-22T05:16:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-11-27T09:06:56+00:00\" \/>\n<meta name=\"author\" content=\"feellikelearning\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"feellikelearning\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/\"},\"author\":{\"name\":\"feellikelearning\",\"@id\":\"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a\"},\"headline\":\"\u600e\u6837\u628a\u547d\u4ee4\u884c\u8f93\u51fa\u5199\u5165\u6587\u4ef6 \uff5chow to log command line out put into a file\",\"datePublished\":\"2020-08-22T05:16:14+00:00\",\"dateModified\":\"2020-11-27T09:06:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/\"},\"wordCount\":20,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/\",\"url\":\"https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/\",\"name\":\"\u600e\u6837\u628a\u547d\u4ee4\u884c\u8f93\u51fa\u5199\u5165\u6587\u4ef6 \uff5chow to log command line out put into a file | Feel Like Learning\",\"isPartOf\":{\"@id\":\"https:\/\/feellikelearning.com\/#website\"},\"datePublished\":\"2020-08-22T05:16:14+00:00\",\"dateModified\":\"2020-11-27T09:06:56+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/feellikelearning.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u600e\u6837\u628a\u547d\u4ee4\u884c\u8f93\u51fa\u5199\u5165\u6587\u4ef6 \uff5chow to log command line out put into a file\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/feellikelearning.com\/#website\",\"url\":\"https:\/\/feellikelearning.com\/\",\"name\":\"Feel Like Learning\",\"description\":\"\u7a0b\u5e8f\uff5c\u751f\u6d3b\uff5c\u5b66\u5230\u5c31\u662f\u8d5a\u5230\",\"publisher\":{\"@id\":\"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/feellikelearning.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a\",\"name\":\"feellikelearning\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/feellikelearning.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/72a1e86e9dcb0332e88bd7d54fd36c28?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/72a1e86e9dcb0332e88bd7d54fd36c28?s=96&d=mm&r=g\",\"caption\":\"feellikelearning\"},\"logo\":{\"@id\":\"https:\/\/feellikelearning.com\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/feellikelearning.com\/index.php\/author\/feellikelearning\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u600e\u6837\u628a\u547d\u4ee4\u884c\u8f93\u51fa\u5199\u5165\u6587\u4ef6 \uff5chow to log command line out put into a file | Feel Like Learning","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/","og_locale":"en_US","og_type":"article","og_title":"\u600e\u6837\u628a\u547d\u4ee4\u884c\u8f93\u51fa\u5199\u5165\u6587\u4ef6 \uff5chow to log command line out put into a file | Feel Like Learning","og_description":"\u5982\u679c\u4e0d\u9700\u8981\u5c4f\u5e55\u540c\u65f6\u8f93\u51fa\uff0c\u53ef\u4ee5\u7528 &#8220;>&#8221;","og_url":"https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/","og_site_name":"Feel Like Learning","article_published_time":"2020-08-22T05:16:14+00:00","article_modified_time":"2020-11-27T09:06:56+00:00","author":"feellikelearning","twitter_card":"summary_large_image","twitter_misc":{"Written by":"feellikelearning"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/#article","isPartOf":{"@id":"https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/"},"author":{"name":"feellikelearning","@id":"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a"},"headline":"\u600e\u6837\u628a\u547d\u4ee4\u884c\u8f93\u51fa\u5199\u5165\u6587\u4ef6 \uff5chow to log command line out put into a file","datePublished":"2020-08-22T05:16:14+00:00","dateModified":"2020-11-27T09:06:56+00:00","mainEntityOfPage":{"@id":"https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/"},"wordCount":20,"commentCount":0,"publisher":{"@id":"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a"},"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/","url":"https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/","name":"\u600e\u6837\u628a\u547d\u4ee4\u884c\u8f93\u51fa\u5199\u5165\u6587\u4ef6 \uff5chow to log command line out put into a file | Feel Like Learning","isPartOf":{"@id":"https:\/\/feellikelearning.com\/#website"},"datePublished":"2020-08-22T05:16:14+00:00","dateModified":"2020-11-27T09:06:56+00:00","breadcrumb":{"@id":"https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/feellikelearning.com\/index.php\/2020\/08\/22\/cn-how-to-log-command-line-out-put-into-a-file\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/feellikelearning.com\/"},{"@type":"ListItem","position":2,"name":"\u600e\u6837\u628a\u547d\u4ee4\u884c\u8f93\u51fa\u5199\u5165\u6587\u4ef6 \uff5chow to log command line out put into a file"}]},{"@type":"WebSite","@id":"https:\/\/feellikelearning.com\/#website","url":"https:\/\/feellikelearning.com\/","name":"Feel Like Learning","description":"\u7a0b\u5e8f\uff5c\u751f\u6d3b\uff5c\u5b66\u5230\u5c31\u662f\u8d5a\u5230","publisher":{"@id":"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/feellikelearning.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a","name":"feellikelearning","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/feellikelearning.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/72a1e86e9dcb0332e88bd7d54fd36c28?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/72a1e86e9dcb0332e88bd7d54fd36c28?s=96&d=mm&r=g","caption":"feellikelearning"},"logo":{"@id":"https:\/\/feellikelearning.com\/#\/schema\/person\/image\/"},"url":"https:\/\/feellikelearning.com\/index.php\/author\/feellikelearning\/"}]}},"_links":{"self":[{"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/posts\/500"}],"collection":[{"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/comments?post=500"}],"version-history":[{"count":4,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/posts\/500\/revisions"}],"predecessor-version":[{"id":767,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/posts\/500\/revisions\/767"}],"wp:attachment":[{"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/media?parent=500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/categories?post=500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/tags?post=500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}