Zip compression on the linux shell

Just as a note to myself and maybe helpful to others.

To compress all files in zip file in a directory:
zip test.zip *.*
creates:
-rw-r--r-- 1 joost joost 111M Jul 21 14:23 test.zip

If you want to split up the zip file because it is a bit too big (111MB) we can use the zipsplit command.
Lets pass the -t parameter to first let it explain what it would do:

joost@xbox-360 ~/Desktop/moos $ zipsplit -tn 10000000 test.zip
12 zip files would be made (100% efficiency)

ooh yes I wants that!
joost@xbox-360 ~/Desktop/moos $ zipsplit -n 10000000 test.zip
12 zip files will be made (100% efficiency)
creating: test01.zip
creating: test02.zip
creating: test03.zip
creating: test04.zip
creating: test05.zip
creating: test06.zip
creating: test07.zip
creating: test08.zip
creating: test09.zip
creating: test10.zip
creating: test11.zip
creating: test12.zip

And there you have it.

About these ads
  1. #1 by lefty.crupps on July 22, 2010 - 12:51 pm

    And how to unzip these 12 files into the original single file (if that is what we started with)?

  2. #2 by totedati on June 15, 2011 - 2:45 am

    unzip test*.zip
    rm test*.zip
    zip test.zip *.*

    easy!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 174 other followers

%d bloggers like this: