Created
April 26, 2019 07:44
-
-
Save daz/5b380ba3c17bfea9f303208a80ca8d7e to your computer and use it in GitHub Desktop.
Clean macOS dotfiles from a USB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove invisible dotfiles from a directory or USB drive | |
# Usage: | |
# cd /Volumes/MY_USB | |
# clean_usb.sh | |
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