PC friendly Mac OS zip compression via the Terminal

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

## 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"

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *