title: Permission denied in find: why do we need 2>&1?
body: <p>I was recently searching for a way to filter out '<em>Permission denied</em>' errors while searching for a file using the <code>find</code> command, and I found this link:</p>
  
  <p><a href="https://stackoverflow.com/questions/762348/how-can-i-exclude-all-permission-denied-messages-from-find">How can I exclude all &quot;permission denied&quot; messages from &quot;find&quot;?</a></p>
  
  <p>Here's an the answer that worked for me from the link:</p>
  
  <pre><code>find . -name "filename" 2&gt;&amp;1 | grep -v 'permission denied'
  </code></pre>
  
  <p>Although this answer works, I don't fully understand why we need the <code>2&gt;&amp;1</code> (redirection  of stderr to stdout).</p>
  
  <p>Doesn't the output from the command <code>find . -name "filename" | grep -v 'Permission denied'</code> already redirect to stdout? </p>