Skip to content

Instantly share code, notes, and snippets.

@LukasRypl
Created July 10, 2022 21:03
Show Gist options
  • Save LukasRypl/b0ea525cd4d1d852c450045d443bde67 to your computer and use it in GitHub Desktop.
Save LukasRypl/b0ea525cd4d1d852c450045d443bde67 to your computer and use it in GitHub Desktop.
After connecting card/USB storage to mac, lot of extra hidden files are generated ... this is a way to remove them
#!/bin/bash
volume="/Volumes/CANON_DC"
# disable indexing
sudo mdutil -v -i off ${volume}
# remove index
sudo mdutil -v -X ${volume}
# remove all mac extra files (verbose)
dot_clean -v ${volume}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment