Split a zip file in osx

Say you have a big file and you want to zip it up into a few smaller files, (coz email attachment has size limit), here is how you do it.

zip -s 5m file.zip myBigFile.mov

That cmd will create these files with file size capped at 5mb

file.z01
file.z02
file.z03
...
file.zip

To get your original file back, install 7zip.

brew install p7zip

Then run the following to extract your original file(s) back

7za x file.zip

There are other ways but I found the above the easiest.

Ref: https://superuser.com/questions/336219/how-do-i-split-a-zip-file-into-multiple-segments
https://superuser.com/questions/365643/how-to-unzip-split-files-on-os-x

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 )

Connecting to %s