{"id":4054,"date":"2014-12-03T00:14:30","date_gmt":"2014-12-02T16:14:30","guid":{"rendered":"http:\/\/rmohan.com\/?p=4054"},"modified":"2014-12-03T00:14:30","modified_gmt":"2014-12-02T16:14:30","slug":"tee-command-and-examples","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=4054","title":{"rendered":"tee command and examples"},"content":{"rendered":"<p>NAME<br \/>\ntee \u2013 read from standard input and write to standard output and files<\/p>\n<p>SYNOPSIS<br \/>\ntee [OPTION]\u2026 [FILE]\u2026<\/p>\n<p>DESCRIPTION<br \/>\nCopy standard input to each FILE, and also to standard output. -a, \u2013append append to the given FILEs, do not overwrite -i, \u2013ignore-interrupts ignore interrupt signals \u2013help display this help and exit \u2013version output version information and exit If a FILE is -, copy again to standard output.<\/p>\n<p>Usage and Examples:<\/p>\n<p><strong>Example 1: Write output to display, and to a file<\/strong><\/p>\n<p>$ ls -la | tee file1<\/p>\n<p><strong>Example 2: Search word strings and pipe to file \u201cSudo_Usages\u201d<\/strong><\/p>\n<p>$ ls -la \/var\/log | grep SSH | tee Sudo_Usages<\/p>\n<p><strong>Example 3: Output stored in more than one files<\/strong><\/p>\n<p>$ ls -la \/etc\/ | tee file1 file2 fileN<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NAME tee \u2013 read from standard input and write to standard output and files<\/p>\n<p>SYNOPSIS tee [OPTION]\u2026 [FILE]\u2026<\/p>\n<p>DESCRIPTION Copy standard input to each FILE, and also to standard output. -a, \u2013append append to the given FILEs, do not overwrite -i, \u2013ignore-interrupts ignore interrupt signals \u2013help display this help and exit \u2013version output version information [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4054"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4054"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4054\/revisions"}],"predecessor-version":[{"id":4055,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4054\/revisions\/4055"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4054"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4054"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4054"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}