开发者

How to move a file in to zip uncompressed, with zip cmd tool

I'm try to determine how to use the zip cmd line tool to move a file (uncompressed) in to a zip of compressed files (ie I want a zip in the end with all files but one comp开发者_Python百科ressed, b/c the one file is another compressed file).

Anyone know how to do this?


It looks like you could use -n option to just store the files with defined extensions together with -g option to append the file to archive.

I didn't test it, but something like this should do the trick:

zip -gn .foo archive.zip myAddedFile.foo

Although documentation states that, by default, zip does not compress files with extensions in the list .Z:.zip:.zoo:.arc:.lzh:.arj, so if you are adding a file with one of those extensions you should be fine.

Documentation to the command is here


-m is what I wanted, moves the file(s) into a zip.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜