Find the duplicates
- use CC cleaner{:target=“_blank”}, go to tools and find duplicated files
Clean up existing data structure
find . -type d -empty -delete
find . -iname thumbs.db -delete
find . -iname .ds_store -delete
find . -iname ._* -delete
find . -iname desktop.ini -delete
To prevent mac from creating .ds_store files
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
This will create a file under ~/Library/Preferences/com.apple.desktopservices.plist Once you have this, the files won’t be created on network and usb stores