macOS - Compress without .DS_Store and __MACOSX
![](https://resources.blogblog.com/img/icon18_edit_allbkg.gif)
https://hocdelamduocviec.blogspot.com/2022/12/macos-compress-without-dsstore-and.html
This command did it for me:
zip -r Target.zip Source -x "*.DS_Store"
Target.zip
is the zip file to create. Source
is the source file/folder to zip up. And the -x
parameter specifies the file/folder to exclude. If the above doesn't work for whatever reason, try this instead:
zip -r Target.zip Source -x "*.DS_Store" -x "__MACOSX"
https://stackoverflow.com/a/22561483
Work well
- Right click --> Compress
zip -d Archive.zip __MACOSX/\*
Check deleted __MACOSX: zipinfo Archive.zip