title: How to see what /bin/sh points to
body: <p>I was reading about the differences between /bin/sh and /bin/bash and came across this interesting question/answer: <a href="https://stackoverflow.com/questions/5725296/difference-between-sh-and-bash/5725402?noredirect=1#comment74080587_5725402">here</a></p>
  
  <p>I made a comment to the answer asking this same question in my title to which he replied with an updated answer:</p>
  
  <blockquote>
    <p>How can you find out what /bin/sh points to on your system?</p>
    
    <p>The complication is that /bin/sh could be a symbolic link or a hard
    link. If it's a symbolic link, a portable way to resolve it is:</p>
  </blockquote>
  
  <pre><code>&gt; % file -h /bin/sh
  &gt; /bin/sh: symbolic link to bash 
  </code></pre>
  
  <blockquote>
    <p>If it's a hard link,
    try</p>
  </blockquote>
  
  <pre><code>&gt; % find -L /bin -samefile /bin/sh 
  &gt; /bin/sh 
  &gt; /bin/bash
  </code></pre>
  
  <p>I tried this and had trouble so I thought I would make a separate question.</p>
  
  <p>My results from the linked answer:</p>
  
  <pre><code>&gt;file -h /bin/sh
  &gt;/bin/sh: executable (RISC System/6000) or object module
  
  &gt;find -L /bin -samefile /bin/sh
  &gt;find: bad option -samefile
  </code></pre>
  
  <p>What am I missing? 
  I'm running AIX:</p>
  
  <pre><code>&gt;oslevel -s
  7100-03-03-1415
  </code></pre>