Zip is not known to be able to create ZIPs greater than 2GB in size. For better or worse, Linux has other tools such as
bzip and others that you can use which have a much higher limit on what they can create. However, if you insist on sticking to ZIP, you could try and use the
--split-size directive like so:
zip -j --split-size 2g $zipfilename *
In case you're wondering about the alternatives...
Creating with Tar
tar -cf name_of_zip.tar directory/
This will create a simple Tar(ball) file. Good for on-the-fly and when you need to get something out quick.
tar -czf name_of_zip.tar.gz directory/
This creates a Tar-Gzipped file of a directory.
tar-gz is a Tar(ball) that has been further compressed by
gzip. It's slightly slower than a standard Tar operation, but provides pretty good compression for what you're getting.
tar -cjf name_of_zip.tar.bz directory/
This creates a Tar-BZipped file of a directory.
tar-bz is the slowest tar option you can use, but provides the greatest amount of compression on top of the tar.
Untarring is a simple matter of replacing the
-c switch with a
-x switch. IE:
tar -xzf /tmp/some_file.tar.gz
Which untars the
/tmp/some_file.tar.gz tar(ball) into whatever directory I'm currently in.
Creating with gzip
gzip -c file file2 file3 > newfile.gz`
Creates a new gzip file from a file, or a bunch of files.
gzip -cr directory/ > newfile.gz`
Creates a new gzip from a directory.
Unzipping is a matter of simply using
gunzip on your
Creating with bzip
BZip doesn't do directory traversal, so it's only good for zipping up one-or-many files.
bzip2 -ck file -<number> > compress.bz
where is a number between 1 and 9, 1 being the lowest level of compression and 9 being the highest.