title: How to delete all files and folders in a directory besides 3 files using terminal
body: <p>I am trying to delete all the files and folders in a specific location on my Raspberry Pi except for <code>.env</code>, <code>.</code>, and <code>..</code>.</p>
  <p>This seems to work:</p>
  <pre><code>find ~/my/app/here/. ! -name '.env' -type f,d -exec rm -rf {} +
  </code></pre>
  <p>With the exception of getting a message after saying that <code>rm: refusing to remove '.' or '..' directory: skipping '/home/pi/my/app/here/.'</code></p>
  <p>How would I be able to delete everything in that folder except for my <code>.env</code> without getting the message above, or add <code>.</code> and <code>..</code> into my command?</p>