How to copy a folder containing more than 12 GB of data

I have a requirement for a zip folder containing a large number of files. When I tried to archive on the command line, it shows a zip error: Error reading input file

I searched the network and found "The .ZIP file format only handles file lengths that can be contained in a 32-bit integer." If so, then this should be the cause of the error I received, because the size of my folder exceeds 12 GB. Is there a way to expand the size of the file that needs to be archived. Or is there another way to solve this?

I am using CENTOS 5.

Thanks.

+4
source share
2 answers

You can use tar for this.

Just try:

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

and extract it:

 $tar -xvzf compress.tgz 
+12
source

GZip can handle any size that your file system can handle. You might want to first β€œtar” the contents into a single file without using GnuTar, you can use the z parameter to compress in one pass.

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

+3
source

Source: https://habr.com/ru/post/974516/


All Articles