Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to zip folder that contains more than 12GB data

Tags:

linux

I have a requirement to zip a folder which contains large number of files. When I tried to zip in command line, it is showing zip error: Input file read failure

I searched net and found "The .ZIP file format, only handles file lengths that can be contained in a 32-bit integer." If so, then it must be the cause of the error I got, because my folder size is more than 12GB. Is there any way to extend the file size to be zipped. Or is there another way to solve this?

I am using CENTOS 5.

Thanks.

like image 323
suva Avatar asked Mar 21 '11 07:03

suva


2 Answers

You can use tar for that.

Just try:

$tar -cvzf compress.tgz /path/to/your/data

and to extract it:

$tar -xvzf compress.tgz
like image 164
ariefbayu Avatar answered Sep 28 '22 05:09

ariefbayu


GZip can handle any size that your file system can handle. You might want to first "tar" the content to one file, unsing the GnuTar you can use the z option to do the compression in one go.

7Zip is also a good alternative to ZIP. It is ported to many platforms and the size limits are much higher.

like image 39
MStr Avatar answered Sep 28 '22 04:09

MStr