OS-X Slice Up Zip’s

Did you know you can send big attachments with Apple Mail if you use your Apple provided email (@icloud.com, @me.com) address? All you have to do is simply attach the file to your email and swoosh, Mail will upload the file to their servers and insert a secured link into the email (I believe it is a random generated URL which is available for a month). This is called Mail Drop. If the recipient is also using Apple Mail instead of a link the actual file will shop up. More details about the service can be found here.

There is a file size limit, maximum allowed size as of today is 5GB, in case you need to send something bigger than you have to slice it up. The graphical zip utility by default doesn’t support this, however it can be easily achieved in Terminal. Here is a handy pdf about Terminal if you are not familiar with it: https://www.apple.com/server/docs/Command_Line.pdf

In my case 2018-06-24_BBC_VBS directory is way bigger than 5GB, containing already compressed files it had to be spited.

du -hs 2018-06-24_BBC_VBS
7.9G 2018-06-24_BBC_VBS

The command to slice a zip up is zip. Example zip -r -s 3g 2018-06-24_BBC_VBS.zip 2018-06-24_BBC_VBS, where -r stands for recursive, -s for size, 3g = 3GB, m can be used for MB, k for KB; then the zip name and the archive to be created

$ zip -r -s 4500m 2018-06-24_BBC_VBS.zip 2018-06-24_BBC_VBS
adding: 2018-06-24_BBC_VBS/ (stored 0%)
adding: 2018-06-24_BBC_VBS/.DS_Store (deflated 84%)
adding: 2018-06-24_BBC_VBS/Day 2/ (stored 0%)
adding: 2018-06-24_BBC_VBS/Day 2/DSC_6737.JPG (deflated 1%)
adding: 2018-06-24_BBC_VBS/Day 2/DSC_6680.JPG (deflated 0%)
adding: 2018-06-24_BBC_VBS/Day 2/DSC_6681.JPG (deflated 0%)
adding: 2018-06-24_BBC_VBS/Day 2/DSC_6722.JPG (deflated 0%)
adding: 2018-06-24_BBC_VBS/Day 2/DSC_6736.JPG (deflated 1%)
adding: 2018-06-24_BBC_VBS/Day 2/DSC_6720.JPG (deflated 1%)
adding: 2018-06-24_BBC_VBS/Day 2/DSC_6734.JPG (deflated 1%)
adding: 2018-06-24_BBC_VBS/Day 2/DSC_6708.JPG (deflated 1%)
adding: 2018-06-24_BBC_VBS/Day 2/DSC_6697.JPG (deflated 0%)
adding: 2018-06-24_BBC_VBS/Day 2/DSC_6683.JPG (deflated 0%)
adding: 2018-06-24_BBC_VBS/Day 2/DSC_6654.JPG (deflated 0%)
adding: 2018-06-24_BBC_VBS/Day 2/DSC_6640.JPG (deflated 0%)

And now we have two zips, trimmed at 4500 megabytes

-rw-r–r– 1 steve staff 4.4G Jul 1 17:01 2018-06-24_BBC_VBS.z01
-rw-r–r– 1 steve staff 3.4G Jul 1 17:03 2018-06-24_BBC_VBS.zip

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.