Linux: How to zip files in parts
There are many times you need to zip a file to smaller parts, especially if you want to sent them with mail which might be an attachment limit
Linux zip command can take the-r and the -s parameters
- r: means recursive.
- s: means break in parts with maximum size of given value.
Example:
$ zip -r -s 45m out.zip ./in
In this case zip will recursivelly compress all files in ./in directory with the maximum zip part being 45MB.
The generated files will have the following pattern
-rw-rw-r-- 1 kpatronas kpatronas 37M Ιουλ 9 12:14 out.zip
-rw-rw-r-- 1 kpatronas kpatronas 45M Ιουλ 9 12:14 out.z01