title: How can I use the `find` command in Linux to remove non-empty directories?
body: <p>I have temp directories full of junk that all start with <code>__temp__</code> (e.g. <code>__temp__user_uploads</code>), which I want to delete with a cleanup function. My function attempt is to run:</p>
  
  <pre><code>find . -name __temp__* -exec rm -rf '{}' \;
  </code></pre>
  
  <p>If I run the command and there are multiple <code>__temp__</code> directories (<code>__temp__foo</code> and <code>__temp__bar</code>), I get the output:</p>
  
  <pre><code>find: __temp__foo: unknown option
  </code></pre>
  
  <p>If I run the command and there is only 1 <code>__temp__</code> directory (<code>__temp__foo</code>), it is deleted and I get the output:</p>
  
  <pre><code>find: ./__temp__foo: No such file or directory
  </code></pre>
  
  <p>Why doesn't the command work, why is it inconsistent like that, and how can I fix it?</p>