Skip to content

Instantly share code, notes, and snippets.

Created Apr 26, 2019
What would you like to do?
Clean macOS dotfiles from a USB
# Remove invisible dotfiles from a directory or USB drive
# Usage:
# cd /Volumes/MY_USB
dot_clean $(pwd)
rm -rf .fseventsd
rm -rf .TemporaryItems
rm -rf .Trash-*
rm -rf .Trashes
rm -rf ._.Trashes
rm -rf ._.*
rm -rf .DS_Store
# Remove .Spotlight-V100
sudo mdutil -X $(pwd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment