<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Shell on Ricardo Martins</title>
    <link>http://ricardomartins.com.br/tags/shell/</link>
    <description>Recent content in Shell on Ricardo Martins</description>
    <image>
      <title>Ricardo Martins</title>
      <url>http://ricardomartins.com.br/images/profile.png</url>
      <link>http://ricardomartins.com.br/images/profile.png</link>
    </image>
    <generator>Hugo</generator>
    <language>pt-BR</language>
    <lastBuildDate>Sun, 21 Dec 2008 22:16:55 -0500</lastBuildDate>
    <atom:link href="http://ricardomartins.com.br/tags/shell/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>10 dicas sobre shell que você ainda não conhece</title>
      <link>http://ricardomartins.com.br/10-dicas-sobre-shell-que-voce-ainda-nao-conhece/</link>
      <pubDate>Sun, 21 Dec 2008 22:16:55 -0500</pubDate>
      <guid>http://ricardomartins.com.br/10-dicas-sobre-shell-que-voce-ainda-nao-conhece/</guid>
      <description>&lt;p&gt;A VentureCake disponibilizou uma lista de 10 dicas sobre shell, prometendo serem desconhecidas, mas extremamente úteis!&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://www.venturecake.com/10-linux-shell-tricks-you-dont-already-know-for-once/&#34;&gt;http://www.venturecake.com/10-linux-shell-tricks-you-dont-already-know-for-once/&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>O que é Shell Script</title>
      <link>http://ricardomartins.com.br/o-que-e-shell-script/</link>
      <pubDate>Sun, 21 Dec 2008 22:14:21 -0500</pubDate>
      <guid>http://ricardomartins.com.br/o-que-e-shell-script/</guid>
      <description>&lt;p&gt;Devido a perguntas como “O que é Shell Script?” e “Como programar em Shell Script?”, Jefferson Virgilio resolveu escrever esta introdução, afim de esclerecer algumas dúvidas de usuários iniciantes. Disponibilizado pelo VivaOLinux.com.br…&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://www.vivaolinux.com.br/artigos/verArtigo.php?codigo=6293&#34;&gt;http://www.vivaolinux.com.br/artigos/verArtigo.php?codigo=6293&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Verificando o arquivo mais recente</title>
      <link>http://ricardomartins.com.br/verificando-o-arquivo-mais-recente/</link>
      <pubDate>Tue, 25 Nov 2008 19:49:24 -0500</pubDate>
      <guid>http://ricardomartins.com.br/verificando-o-arquivo-mais-recente/</guid>
      <description>&lt;div class=&#34;entry&#34;&gt;Hoje estava eu aqui testando uns shell scripts, e descobri uma forma de verificar qual o arquivo de log mais recente criado em um diretório.
&lt;p&gt;Basta você executar:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ ls -1rtd /home/pasta/* | tail -1&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Se quiser testar, entre no seu /home, e crie 4 arquivos, por exemplo, arq1, arq2, arq3 e arq4, com algum intervalo entre o tempo de criação de cada um.&lt;/p&gt;
&lt;p&gt;Depois execute:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ cd ~&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ ls -1rtd * | tail -1&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Matando processos por usuário</title>
      <link>http://ricardomartins.com.br/matando-processos-por-usuario/</link>
      <pubDate>Tue, 25 Nov 2008 19:48:13 -0500</pubDate>
      <guid>http://ricardomartins.com.br/matando-processos-por-usuario/</guid>
      <description>&lt;div class=&#34;entry&#34;&gt;Essa é uma dica rápida para matar todos os processos de um usuário de uma vez só.
&lt;p&gt;Basta executar:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ ps -efu$USER | awk &#39;{print $2}&#39; | xargs -i bash -c &amp;quot;echo matando {};kill -TERM {}&amp;quot;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Agora explicando…&lt;/p&gt;
&lt;p&gt;O comando “ps -efu$USER” vai mostrar todos os processos iniciados pelo usuário que você está usando. (Para verificar qual é este usuário, usa-se o comando “whoami” ou o comandi “id”).&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ ps -efu$USER&amp;lt;br&amp;gt;&amp;lt;/br&amp;gt;USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Atalhos da linha de comando (set -o emacs)</title>
      <link>http://ricardomartins.com.br/atalhos-da-linha-de-comando-set-o-emacs/</link>
      <pubDate>Tue, 25 Nov 2008 19:45:31 -0500</pubDate>
      <guid>http://ricardomartins.com.br/atalhos-da-linha-de-comando-set-o-emacs/</guid>
      <description>&lt;p&gt;Teclas de Atalho do BASH&lt;/p&gt;
&lt;p&gt;* Histórico:&lt;/p&gt;
&lt;p&gt;CTRL + P: equivale a seta para cima&lt;br&gt;
CTRL + N: equivale a seta para baixo&lt;br&gt;
CTRL + R: Busca por uma linha de forma descendente&lt;br&gt;
CTRL + S: Busca por uma linha de forma ascendente&lt;br&gt;
CTRL + J: Finaliza busca&lt;br&gt;
CTRL + G: Aborta a busca e retorna a linha original&lt;br&gt;
ALT + CTRL + Y: Mostra argumentos do último comando&lt;br&gt;
ALT + .: Mostra o último argumento do último comando&lt;br&gt;
ALT + _: Mostra o último argumento do último comando&lt;br&gt;
ALT + &amp;gt;: Busca pelos últimos argumentos&lt;br&gt;
ALT + &amp;lt; + &amp;gt;: “Cola o último argumento buscado e inicia nova busca&lt;br&gt;
!$: imprime na tela a última palavra do comando anterior&lt;br&gt;
!!: equivale ao CTRL + P +&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
