LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Splitting ZIP file on the fly (https://www.linuxquestions.org/questions/linux-general-1/splitting-zip-file-on-the-fly-707213/)

SlowCoder 02-24-2009 03:17 PM

Splitting ZIP file on the fly
 
I need to create a ZIP archive that will easily be larger than 10G in size. There is a limit to the size a ZIP file can be (I believe 4G). I don't know if this means per file if the archive is split, or the total archive size.

I will need to split the file into parts of about 4G each, as I will need to burn them to DVD.

What are my options?

kentyler 02-24-2009 03:25 PM

There is no real limit to zip but the file system you wish to put the file on.

You can use tar to split files:

You should specify the volume size (tape length) in kilo-bytes:
tar --tape-length=1390 --multi-volume -create --file=//a/foo.tar <files>

or shorter:
tar -L 1390 -Mcf //a/foo.tar <files>

1390 kbytes is the largest size of a file you can fit on a standard
FAT formatted HD floppy (although the file will appear to be 1420 kb).

H_TeXMeX_H 02-25-2009 04:44 AM

I say use 7zip/p7zip to make volumes.

Code:

7z a -v4g test.zip files
This tells it to add files to test.zip and generate 4 GB volumes.


All times are GMT -5. The time now is 05:47 AM.