I'd like to try out BackBlaze B2 to back up 400 GB of files. However, I'd like to zip and encrypt before uploading.


  • split a folder to multiple folders (folders contain videos and images)
  • split should be based on size (or number of files if it's easier)
  • folder naming should have a number at the end ~/Desktop/name0001/ for example
  • zip each folder with the same password
  • if a zipped folder were to be deleted, the rest can still be unzipped
  • unzip and merge files back to the way they were before they were split and zipped
  • runs on OSX terminal (but a linux answer would help out others too)

Example input


Output after splitting process

someName01.zip //encrypted
someName02.zip //encrypted

Output after unzipping and merging


I'm aware of these two posts, but they fall short of my needs. I also know about about zip -s <size> option, but I'm worried that if one zip file gets corrupted, I won't be able to merge the rest back together.

  • This falls under software recommendations, which is offtopic here on SuperUser. Any archiver can split a large file into smaller portions, but indeed if one of the files get corrupted you won't be able to unzip. – LPChip Jun 15 '16 at 16:55
  • I'm not looking for software recommendation, but a set of terminal commands instead. Where would be a more appropriate place for my question other than software recommendations? – jonmecer Jun 15 '16 at 17:12
  • What you want is not possible with zip, which is why it becomes a software recommendation. There's a software recommendations stack exchange site. – LPChip Jun 15 '16 at 20:27
  • I see. Thank you. Perhaps I should ask three questions instead of one. 1. How to split contents of a folder by size and put it back together. 2. Rename each split folder. 3. Zip and encrypt a folder. – jonmecer Jun 15 '16 at 20:35
  • Well, if you edit out the part about zip -s <size> and that it gets corrupted, it becomes valid for SuperUser. – LPChip Jun 15 '16 at 20:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.