{"id":3349,"date":"2020-05-02T07:51:33","date_gmt":"2020-05-02T06:51:33","guid":{"rendered":"https:\/\/www.itersdesktop.com\/?p=3349"},"modified":"2020-05-02T10:42:55","modified_gmt":"2020-05-02T09:42:55","slug":"how-to-append-text-to-a-system-file-via-terminal-with-sudo-command","status":"publish","type":"post","link":"https:\/\/www.itersdesktop.com\/fr\/2020\/05\/02\/how-to-append-text-to-a-system-file-via-terminal-with-sudo-command\/","title":{"rendered":"How to append text to a system file via terminal with sudo command"},"content":{"rendered":"echo &lsquo;192.168.1.254 router&rsquo; | sudo tee -a \/etc\/hosts<br \/>NAME<br \/>     tee &#8212; pipe fitting<br \/><br \/>SYNOPSIS<br \/>     tee [-ai] [file &#8230;]<br \/><br \/>DESCRIPTION<br \/>     The tee utility copies standard input to standard output, making a copy in zero or more files.  The output is<br \/>     unbuffered.<br \/><br \/>     The following options are available:<br \/><br \/>     -a      Append the output to the files rather than overwriting them.<br \/><br \/>     -i      Ignore the SIGINT signal.<br \/><br \/>     The following operands are available:<br \/><br \/>     file  A pathname of an output file.<br \/><br \/>     The tee utility takes the default action for all signals, except in the event of the -i option.<br \/><br \/>     The tee utility exits 0 on success, and >0 if an error occurs.<br \/><br \/>STANDARDS<br \/>     The tee function is expected to be POSIX IEEE Std 1003.2 (\u00ab\u00a0POSIX.2\u00a0\u00bb) compatible.","protected":false},"excerpt":{"rendered":"<p>echo &lsquo;192.168.1.254 router&rsquo; | sudo tee -a \/etc\/hostsNAME tee &#8212; pipe fitting SYNOPSIS tee [-ai] [file &#8230;] DESCRIPTION The tee utility copies standard input to standard output, making a copy&hellip; <\/p>\n","protected":false},"author":2,"featured_media":3354,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[174,189,176],"tags":[720,732],"class_list":["post-3349","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-terminal","category-ubuntu","tag-append-text-to-the-file","tag-tee-command"],"_links":{"self":[{"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/posts\/3349","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/comments?post=3349"}],"version-history":[{"count":4,"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/posts\/3349\/revisions"}],"predecessor-version":[{"id":3355,"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/posts\/3349\/revisions\/3355"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/media\/3354"}],"wp:attachment":[{"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/media?parent=3349"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/categories?post=3349"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itersdesktop.com\/fr\/wp-json\/wp\/v2\/tags?post=3349"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}