Uly.me

cloud engineer

  • Home
  • About
  • Archives
Home/Mac/Delete .DS_Store Files Recursively

January 31, 2013

Delete .DS_Store Files Recursively

If you work with MacOS and you FTP files to a Linux server, you probably have seen this pesky and ubiquitous hidden files named .DS_Store. They seem to be in every folder known to man. The .DS_Store files are hidden MacOS files used to store the attributes of a folder such as position of icons and choice of background images, etc. Although they are not harmful, they probably don’t belong on the web server. Instead of deleting them one by one, there’s a faster way of deleting them recursively. You can invoke this command from the Linux terminal on your webroot folder.

cd /var/www/
find . "-name" ".DS_Store" -exec rm {} \;

cd /var/www/ find . "-name" ".DS_Store" -exec rm {} \;

The .DS_Store files will be deleted recursively.

Filed Under: Mac Tagged With: .ds_store, delete, mac os, recursively

Content delivered to your email

About Me

I'm Ulysses, a Cloud Engineer at Cardinal Health based in Columbus, Ohio. I’m a certified AWS Solutions Architect. This website is my way of documenting the things I have learned in the Cloud. When off the grid, I enjoy riding my electric skateboard. I have surfed, snowboarded and played the saxophone in the past. I hope you will find this site helpful. It's powered by WordPress and hosted in AWS LightSail.

  • Cloud
  • Linux
  • Git

Copyright © 2012–2021