title: Doing sha1sum comparisons for directories vs their softlinks
body: <p>What I'm doing: comparing sha1sums of directories. I am doing this using:</p>
  <pre><code>sum=$(find $path -type f -print0 | sort -z | xargs -0 sha1sum | sha1sum | awk '{print $1}')
  </code></pre>
  <p>And when sshing into other hosts:</p>
  <pre><code>sum=$(ssh -n $host &quot;find $path -type f -print0 | sort -z | xargs -0 sha1sum | sha1sum &quot; | awk '{print $1}')
  </code></pre>
  <p>My question is about softlinks. Suppose we have a directory such that <code>/this/path -&gt; /different/path</code></p>
  <p>When I do the above commands for <code>/this/path</code> and then for <code>/different/path</code>, I get two different sha1sums. Why is this the case, and how do I get around this?</p>