Compress\".From what I understand" />
开发者

What flags do I need to pass to ditto to mimic the behavior of "right click -> Compress"?

I'm writing a shell script that needs to compress a dir with the same options that are set from the Mac GUI when y开发者_StackOverflow中文版ou do a "right click -> Compress". From what I understand ditto is the right tool for the job, but what flags do I need to pass besides "-c"? I've tried raw "-c" as well as "-c -k" and both give different results from the right click.


According to "man ditto",

The command:

       ditto -c -k --sequesterRsrc --keepParent src_directory archive.zip

will create a PKZip archive similarly to the Finder's Compress functionality.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜