{"id":357,"date":"2021-10-05T22:38:42","date_gmt":"2021-10-05T22:38:42","guid":{"rendered":"http:\/\/jplatz.com.br\/syntax\/?p=357"},"modified":"2021-10-05T22:40:11","modified_gmt":"2021-10-05T22:40:11","slug":"linux-type-e-which-para-localizar-path-de-comandos-e-executaveis","status":"publish","type":"post","link":"https:\/\/jplatz.com.br\/syntax\/2021\/10\/05\/linux-type-e-which-para-localizar-path-de-comandos-e-executaveis\/","title":{"rendered":"Linux Type e Which Para Localizar Path de Comandos e Execut\u00e1veis"},"content":{"rendered":"\n<pre class=\"wp-block-preformatted\">type -a bash\ntype -a zsh\ntype -a git\ntype -a asdf\n\nwhich bash\nwhich zsh\nwhich git\n<\/pre>\n\n\n\n<p>Olha s\u00f3 que legal! Em algumas situa\u00e7\u00f5es precisamos descobri o <strong><em>PATH<\/em><\/strong> de alguns comandos, pacotes ou programas instalados no seu sistema operacional.<\/p>\n\n\n\n<p>Antigamente eu costumava fazer isso com o <strong>locate<\/strong> ou <strong>find<\/strong>, mas o resultado nem sempre era f\u00e1cil de obter com estes dois recursos.<\/p>\n\n\n\n<p>Recentemente eu estava configurando v\u00e1rios pacotes no meu Arch Linux Desktop e tive que encontrar o <strong>path<\/strong> de um aplicativo para poder configurar corretamente. Foi a\u00ed que me deparei com estes dois recursos mais modernos e mais f\u00e1ceis de usar.<\/p>\n\n\n\n<p>O <strong>type<\/strong> funcionou perfeitamente com os v\u00e1rios pacotes incluindo o <strong>asdf<\/strong>. J\u00e1 o <strong>which<\/strong> falhou com o <strong>asdf<\/strong> n\u00e3o sei exatamente o porqu\u00ea.<\/p>\n\n\n\n<p>Na d\u00favida, vai de type&#8230; mas o which tamb\u00e9m manda bem pra caramba!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>type -a bash type -a zsh type -a git type -a asdf which bash which zsh which git Olha s\u00f3 que legal! Em algumas situa\u00e7\u00f5es precisamos descobri o PATH de alguns comandos, pacotes ou programas instalados no seu sistema operacional. Antigamente eu costumava fazer isso com o locate ou find, mas o resultado nem sempre [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,9],"tags":[115,166,164,165],"class_list":["post-357","post","type-post","status-publish","format-standard","hentry","category-command-line","category-linux","tag-find","tag-locate","tag-type","tag-which"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/jplatz.com.br\/syntax\/wp-json\/wp\/v2\/posts\/357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jplatz.com.br\/syntax\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jplatz.com.br\/syntax\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jplatz.com.br\/syntax\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jplatz.com.br\/syntax\/wp-json\/wp\/v2\/comments?post=357"}],"version-history":[{"count":2,"href":"https:\/\/jplatz.com.br\/syntax\/wp-json\/wp\/v2\/posts\/357\/revisions"}],"predecessor-version":[{"id":360,"href":"https:\/\/jplatz.com.br\/syntax\/wp-json\/wp\/v2\/posts\/357\/revisions\/360"}],"wp:attachment":[{"href":"https:\/\/jplatz.com.br\/syntax\/wp-json\/wp\/v2\/media?parent=357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jplatz.com.br\/syntax\/wp-json\/wp\/v2\/categories?post=357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jplatz.com.br\/syntax\/wp-json\/wp\/v2\/tags?post=357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}