Mac zip compress without __MACOSX folder?

后端 未结 14 1554
有刺的猬
有刺的猬 2020-12-07 06:53

When I compress files with the built in zip compressor in Mac OSX, it results in an extra folder titled \"__MACOSX\" created in the extracted zip.

Can I adjust my se

14条回答
  •  盖世英雄少女心
    2020-12-07 07:31

    Inside the folder you want to be compressed, in terminal:

    zip -r -X Archive.zip *
    

    Where -X means: Exclude those invisible Mac resource files such as “_MACOSX” or “._Filename” and .ds store files

    source

    Note: Will only work for the folder and subsequent folder tree you are in and has to have the * wildcard.

提交回复
热议问题