Zip functionality with split?

Associate
Joined
21 May 2003
Posts
1,008
Hi. In Windows, winzip can split an archive over many files, and I just specifiy how big I want each chunk to be. The final result is many files named z01, z02,z03, all exactly the same size apart from the last one.

Is there a way to do this in linux? I 've found zipsplit, but this actually just spreads the files across multiple zip files and zips them in batches, rather than just splitting the final zip file. (I can't use this as it has a 2gb file size limit).
 
Associate
Joined
18 Oct 2002
Posts
387
It would help if you mentioned what you are trying to achieve with the zip file once its created.

There is some functionality like this in 7-zip if you want to install specific software which will create multi-part archives.

You can also do it with split / cat just make your achive using zip then.

split -b 10m somefile.zip someprefix-

that will split your archive into 10MB chunks called someprefix-aa, someprefixe-ab etc etc.

to reassemble them for unpacking use cat.

cat someprefix-aa someprefix-ab ... > somefile.zip
 
Associate
OP
Joined
21 May 2003
Posts
1,008
Sorry, to clarify, I need to create an archive in linux that's split over many chunks, and then be able to unzip it in Windows (preferably with winzip).
 
Associate
Joined
18 Oct 2002
Posts
387
if you want something to make your zip from the command line then install 7zip and use the -V switch. This should split the archive into the size chunks you specify.

If you want something that works in the GUI try file roller , that should do what you need :)
 
Associate
OP
Joined
21 May 2003
Posts
1,008
The problem with 7zip is that it splits the zip file in parts ending in 001,002,003 etc, which winzip doesn't understand.

So the user needs to have 7zip or some other file joiner to merge the files together and then unzip them.

With winzip, when creating a split archive, it creates a single .zip file, and then the rest are called z01,z02,z03 etc. unzipping the .zip file will automatically read the rest of the files.
 
Associate
Joined
10 May 2007
Posts
716
If you have zip version 3+ (zip -v) then the following to split into 100MB chunks

Code:
$ zip -s 100m archive CentOS-6.2-x86_64-LiveCD.iso
  adding: CentOS-6.2-x86_64-LiveCD.iso (deflated 2%)
$ ls | grep archive
archive.z01
archive.z02
archive.z03
archive.z04
archive.z05
archive.z06
archive.zip
 
Last edited:
Associate
Joined
18 Oct 2002
Posts
387
If you just split the file on the linux machine you can recombine it on the windows machine without any software installed.

I split a large zip file into 100M chunks called ziptest

copied them over to the windows cox and ran this command on the windows machine.

copy /b ziptest-aa+ziptest-ab+ziptest-ac+ziptest-ad+ziptest-ae+ziptest-af+ziptest-ag newzip.zip

takes a few secs then newzip.zip works fine within winzip. :)
 
Associate
OP
Joined
21 May 2003
Posts
1,008
My users aren't clever enough to recombine themselves, so a Winzip option is a must.

zip 3+ looks like it does what I need (judging by the filenames as this is exactly the same output from winzip). But I'm having trouble finding an RPM package for Centos 5. Where's the best place to get it from?
 
Associate
Joined
18 Oct 2002
Posts
387
My users aren't clever enough to recombine themselves, so a Winzip option is a must.

zip 3+ looks like it does what I need (judging by the filenames as this is exactly the same output from winzip). But I'm having trouble finding an RPM package for Centos 5. Where's the best place to get it from?

Can't comment on an RPM package as haven't looked for one but the source is here ftp://ftp.info-zip.org/pub/infozip/src/ not a major job to compile it. :)
 
Top Bottom