title: Why using dirname in find command gives dots for each match?
body: <p>I'm using find for a task and I noticed that when I do something like this:</p>
  
  <pre><code>find `pwd` -name "file.ext" -exec echo $(dirname {}) \;
  </code></pre>
  
  <p>it will give you dots only for each match. When you substitute <code>dirname</code> with <code>basename</code> in that command you get the full pathnames.  Am I screwing something up here or is this expected behavior? I'm used to <code>basename</code> giving you the name of the file (in this case <code>file.ext</code>) and <code>dirname</code> giving you the rest of the path.</p>