title: How can I get the behavior of GNU's readlink -f on a Mac?
body: <p>On Linux, the <code>readlink</code> utility accepts an option <code>-f</code> that follows additional links. This doesn't seem to work on Mac and possibly BSD based systems. What would the equivalent be?</p>
  
  <p>Here's some debug information:</p>
  
  <pre><code>$ which readlink; readlink -f
  /usr/bin/readlink
  readlink: illegal option -f
  usage: readlink [-n] [file ...]
  </code></pre>