How to create a zip file in the same format as the Finder's “Compress” menu item?

后端 未结 4 1743
青春惊慌失措
青春惊慌失措 2020-12-15 16:06

On Mac OS X, you can create a zip archive from the Finder by selecting some files and selecting \"Compress\" from the contextual menu or the File menu. Unfortunately, the r

4条回答
  •  感动是毒
    2020-12-15 16:56

    Use the ditto command-line tool as follows:

    ditto -ck --rsrc --sequesterRsrc folder file.zip
    

    See the ditto man page for more.

提交回复
热议问题