If you work with systems that can’t ignore Mac OS File System meta data…

1
2
3
4
5
6
7
8
## remove Mac OS gubbins from zip file:
zip -d archive.zip __MACOSX/\*
zip -d archive.zip *.DS_Store
 
## zip a folder from terminal without Mac OS gubbins.
## Target.zip is the zip file to create.
## Source is the source file/folder to zip up.
zip -r Taget.zip Source -x "*.DS_Store" -x "__MACOSX"

Last updated on 5th September 2018