title: Use of the 'hash' command
body: <p>I'm working on a small app based on ffmpeg, and I read a <a href="http://ubuntuforums.org/archive/index.php/t-1438052.html" rel="nofollow noreferrer">tutorial made for ubuntu</a> where they advise to use the command <code>hash</code> on the produced executable.</p>
  
  <p>I'm curious about that command, did you ever use it? For which purpose?</p>
  
  <p>When I run it in my source folder, I get this (once compiled)</p>
  
  <pre><code>$ hash
  hits    command
     1    /usr/bin/strip
     1    /usr/local/bin/ffmpeg
     1    /usr/bin/svn
     4    /usr/local/bin/brew
     2    /usr/bin/git
     1    /bin/rm
     1    /bin/cat
     1    /usr/bin/ld
     1    /bin/sh
     4    /usr/bin/man
     5    /usr/bin/make
     4    /usr/bin/otool
    15    /bin/ls
     6    /usr/bin/open
     2    /usr/bin/clear
  </code></pre>
  
  <p>Looks like a summary of my bash_history…</p>
  
  <p>When I run it on an executable file, I do not have lots of lines displayed, and nothing seems to changes in that application ?</p>
  
  <pre><code>$ md5 ffserver
  MD5 (ffserver) = 2beac612e5efd6ee4a827ae0893ee338
  $ hash ffserver
  $ md5 ffserver
  MD5 (ffserver) = 2beac612e5efd6ee4a827ae0893ee338
  </code></pre>
  
  <p>When I look for the man, it just says it's a builtin function. Really useful :)</p>
  
  <p>It does work (let say <em>exist</em>) on Linux and on <a href="https://web.archive.org/web/20150923083736/http://developer.apple.com/library/mac/DOCUMENTATION/Darwin/Reference/ManPages/man1/hash.1.html" rel="nofollow noreferrer">MacOSX</a>.</p>