Compress without .DS_Store and __MACOSX
- Open Terminal (search for terminal in spotlight or right click on folder you want to zip and choose “New terminal at folder” )
- Navigate to the folder you want to zip using the cd command
- Paste this:
zip -r name_of_zip_file.zip . -x ".*" -x "__MACOSX"
Cleanup file.zip from .DS_Store
and __MACOSX
, including subfolders:
zip -d name_of_zip_file.zip '__MACOSX/*' '*/__MACOSX/*' .DS_Store '*/.DS_Store'