Skip to content

Instantly share code, notes, and snippets.

@ozws
Last active July 16, 2018 12:42
Show Gist options
  • Select an option

  • Save ozws/30a6d37f4eea6993a05a5433fad60fdd to your computer and use it in GitHub Desktop.

Select an option

Save ozws/30a6d37f4eea6993a05a5433fad60fdd to your computer and use it in GitHub Desktop.
Recursively delete all .DS_Store files in a directory on macOS
#!/bin/bash
## Recursively delete all .DS_Store files in a directory on macOS.
# ! WARNING: You assume any and all liability !
# Open your terminal app of choice
# cd to folder
cd /path/to/folder
# Remove .DS_Store pollution
find . -name '.DS_Store' -type f -delete
# To keep them from coming back, have a go at these instructions:
# http://pixelcog.com/blog/2016/disable-ds_store-in-el-capitan/
# And yes, I do have Asepsis working on my machine. :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment