Add zip files from one archive to another using command line

Posted by Curious2learn on Stack Overflow See other posts from Stack Overflow or by Curious2learn
Published on 2011-01-06T22:15:03Z Indexed on 2011/01/06 22:53 UTC
Read the original article Hit count: 218

Filed under:
|
|

I have two zip archives. Say, set1 has 10 csv files created using Mac OS X 10.5.8 compress option, and set2 has 4 csv files similarly created. I want to take the 4 files from zipped archive set2 and add them to list of files in archive set1. Is there a way I can do that?

I tried the following in Terminal:

zip set1.zip set2.zip

This adds the whole archive set2.zip to set1.zip, i.e., in set1.zip now I have:

file1.csv, file2.csv,..., file10.csv, set2.zip

What I instead want is:

file1.csv, file2.csv,..., file10.csv, file11.csv, ..., file14.csv

where, set2.zip is the archive containing file11.csv, ..., file14.csv.

Thanks.

© Stack Overflow or respective owner

Related posts about osx

Related posts about bash