{"id":2095,"date":"2021-01-27T09:00:04","date_gmt":"2021-01-27T09:00:04","guid":{"rendered":"https:\/\/swiv.com.br\/linux-sequential-commands\/"},"modified":"2026-05-27T20:02:52","modified_gmt":"2026-05-27T19:02:52","slug":"linux-sequential-commands","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2021\/01\/27\/linux-sequential-commands\/","title":{"rendered":"Linux Sequential Commands"},"content":{"rendered":"\n<p>Para execu\u00e7\u00e3o sequencial no Linux, basta colocar um &#8220;;&#8221; como no exemplo abaixo. Importante salientar que deste modo, mesmo que um comando n\u00e3o seja bem sucedido, seguir\u00e1 sua sequ\u00eancia e executar\u00e1 o pr\u00f3ximo comando:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@oel7 ~]# date ; ll ; uptime\nWed Jan 27 05:45:57 -03 2021\ntotal 12\n-rw-------. 1 root root 1708 Apr 16  2020 anaconda-ks.cfg\ndrwxr-xr-x. 2 root root    6 Apr 24  2020 Desktop\ndrwxr-xr-x. 2 root root    6 Apr 24  2020 Documents\ndrwxr-xr-x. 2 root root    6 Apr 24  2020 Downloads\n-rw-r--r--. 1 root root 1742 Apr 16  2020 initial-setup-ks.cfg\ndrwxr-xr-x. 2 root root    6 Apr 24  2020 Music\ndrwxr-xr-x. 2 root root    6 Apr 24  2020 Pictures\ndrwxr-xr-x. 2 root root    6 Apr 24  2020 Public\ndrwxr-xr-x. 2 root root    6 Apr 24  2020 Templates\n-rwxrwxr-x. 1 root root   41 Jan 26 05:44 variavel.sh\ndrwxr-xr-x. 2 root root    6 Apr 24  2020 Videos\n 05:45:57 up 3 min,  1 user,  load average: 2.04, 1.38, 0.58\n&#x5B;root@oel7 ~]# ll sdfdf.txt ; asfdsf ; date\nls: cannot access sdfdf.txt: No such file or directory\nbash: asfdsf: command not found...\nWed Jan 27 05:58:49 -03 2021\n<\/pre><\/div>\n\n\n<p>Caso usemos o &#8220;&amp;&amp;&#8221;, a\u00ed cria-se a depend\u00eancia que o comando posterior s\u00f3 executar\u00e1 caso o comando anterior tenha sido bem sucedido:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@oel7 ~]# date &amp;amp;&amp;amp; ll\nWed Jan 27 05:49:06 -03 2021\ntotal 12\n-rw-------. 1 root root 1708 Apr 16  2020 anaconda-ks.cfg\ndrwxr-xr-x. 2 root root    6 Apr 24  2020 Desktop\ndrwxr-xr-x. 2 root root    6 Apr 24  2020 Documents\ndrwxr-xr-x. 2 root root    6 Apr 24  2020 Downloads\n-rw-r--r--. 1 root root 1742 Apr 16  2020 initial-setup-ks.cfg\ndrwxr-xr-x. 2 root root    6 Apr 24  2020 Music\ndrwxr-xr-x. 2 root root    6 Apr 24  2020 Pictures\ndrwxr-xr-x. 2 root root    6 Apr 24  2020 Public\ndrwxr-xr-x. 2 root root    6 Apr 24  2020 Templates\n-rwxrwxr-x. 1 root root   41 Jan 26 05:44 variavel.sh\ndrwxr-xr-x. 2 root root    6 Apr 24  2020 Videos\n&#x5B;root@oel7 ~]# ll dsfsdfsdf.txt &amp;amp;&amp;amp; ll\nls: cannot access dsfsdfsdf.txt: No such file or directory\n&#x5B;root@oel7 ~]#\n<\/pre><\/div>\n\n\n<p>J\u00e1 o &#8220;||&#8221; s\u00f3 executar\u00e1 o comando posterior caso o comando anterior tenha sido mal sucedido:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@oel7 ~]# ll sdfsdf.txt || date\nls: cannot access sdfsdf.txt: No such file or directory\nWed Jan 27 05:53:11 -03 2021\n&#x5B;root@oel7 ~]# uptime || date\n 05:53:24 up 10 min,  1 user,  load average: 2.08, 1.91, 1.15\n&#x5B;root@oel7 ~]#\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>Para execu\u00e7\u00e3o sequencial no Linux, basta colocar um &#8220;;&#8221; como no exemplo abaixo. Importante salientar que deste modo, mesmo que um comando n\u00e3o seja bem sucedido, seguir\u00e1 sua sequ\u00eancia e executar\u00e1 o pr\u00f3ximo comando: Caso usemos o &#8220;&amp;&amp;&#8221;, a\u00ed cria-se a depend\u00eancia que o comando posterior s\u00f3 executar\u00e1 caso o comando anterior tenha sido bem [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[21],"class_list":["post-2095","post","type-post","status-publish","format-standard","hentry","category-linux","tag-oracle-linux"],"_links":{"self":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/2095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/comments?post=2095"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/2095\/revisions"}],"predecessor-version":[{"id":9266,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/2095\/revisions\/9266"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=2095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=2095"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=2095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}