title: Script to clear dummy files like .DS_Store ._foo thumbs.db etc
body: <p>I have a external drive that I use on my car and on my TV, I use Mac OS X to manage files, but the hidden files that the Finder and Windows creates is very annoying because they show on my TV, also takes longer to initialize my car player because it is too dumb to index just non-hidden folders.</p>
  
  <p>I want to create a bash script in the root directory of a drive to easily double click and clean these files created by Windows Explorer and Finder.</p>
  
  <p><img src="https://i.stack.imgur.com/fXs0p.png" alt="enter image description here"></p>
  
  <pre><code>Recycled
  Thumbs.db        (appear in sub-folders)
  desktop.ini      (appear in sub-folders)
  
  .Spotlight-V100  
  .TemporaryItems
  .Trashes
  .apdisk
  
  .DS_Store        (appear in sub-folders)
  ._foo            (shadow files, appear in sub-folders)
  </code></pre>
  
  <p>The files prefixed with <code>._</code> is the most annoying because they show up as corrupted files like <code>._wallpaper.jpg</code></p>
  
  <p>I'm not very experienced with bash, I don't want any surprise.</p>
  
  <pre><code>find . -name ".DS_Store" -delete
  </code></pre>