title: Why is find -delete faster than rm -rf?
body: <p>Why is <code>find ... -delete</code> so much faster than <code>rm -rf</code> ?  Specifically, </p>
  
  <p>To clarify:  I'm specifically asking: Why is <code>find ./x -type d -delete &amp;&amp; rm -rf x</code> so much faster than <code>rm -rf x/</code>?</p>
  
  <h3>Background</h3>
  
  <p>There have been a few people who use similar mechanisms, like rsync.</p>
  
  <ul>
  <li><p>There are several posts on why <code>rm -rf</code> is slow.  For example, <a href="https://unix.stackexchange.com/questions/106133/why-is-rm-slow">https://unix.stackexchange.com/questions/106133/why-is-rm-slow</a> is probably one of the most focused ones.</p></li>
  <li><p>Specifically, I've found <code>cd dir-to-delete &amp;&amp; find . -type d -delete</code> followed by <code>rm -rf dir-to-delete</code> is extremely fast,  even on large directories.</p></li>
  </ul>