Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tpowellcio/9838f0407c01c3eda944bccf84378489 to your computer and use it in GitHub Desktop.
Save tpowellcio/9838f0407c01c3eda944bccf84378489 to your computer and use it in GitHub Desktop.
Prevent Mac from Writing stupid files to USB

#Prevent Mac from Writing stupid files to USB

mdutil -i off /Volumes/yourUSBstick
cd /Volumes/yourUSBstick
rm -rf .{,_.}{fseventsd,Spotlight-V*,Trashes}
mkdir .fseventsd
touch .fseventsd/no_log .metadata_never_index .Trashes
cd -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment