title: How to rm -fr * reliably?
body: <pre><code>rm -fr *
  </code></pre>
  
  <p>won't delete <code>.files</code></p>
  
  <p>On the other hand, </p>
  
  <pre><code>rm -fr * .*
  </code></pre>
  
  <p>will delete too much!</p>
  
  <p>Is there a reliable way to recursively delete all contents of a directory in Bash?</p>
  
  <p>One way I can think of is:</p>
  
  <pre><code>rm -fr $PWD
  mkdir $PWD
  cd $PWD
  </code></pre>
  
  <p>This has the side-effect of deleting <code>$PWD</code> temporarily.</p>