2

I zipped a folder on centOS 5. It zipped up to around 4.1GB.

Now i am trying to unzip it but it gives error. I have tried a number of options. First with using the unzip command it says

enter image description here

then i tried to use

jar xvf filename

as I found during research that it can work. It works to extract some files but then give the following error.

enter image description here

finally I tried 7zip as an option. But it fails to giving the following error.

enter image description here

Here is some additional information.

Running the file command on the file gives

site_backup_sep03_2015.zip: Zip archive data, at least v2.0 to extract

running the stat command on it gives

enter image description here

is there a way to extract the file?

  • 1
    Have you tried zcat on the file to see if you get any sort of output? – Kassandry Sep 3 '15 at 20:48
  • 1
    Can you confirm that you have the 64bit version of java installed? What filesystem type are you extracting to? If you type "file site_backup_sep03_2015.zip" what do you see? also use "stat" on the file. – Aaron Sep 3 '15 at 21:02
  • @Aaron: No it is a 32-bit system. – S. A. Malik Sep 4 '15 at 4:43
  • 1
    Greater than 4 gig on a 32 bit box is problematic for lots of operations. – TheFiddlerWins Sep 4 '15 at 14:02
2

Being on a 32bit system and using 32bit apps and/or using a version of unzip older than 6.0, you are likely hitting one of these limits

Most likely this limit, "compressed size of a single file" 4GB

In practice, the real limit may be 2 GB on many systems, due to UnZip's use of the fseek() function to jump around within an archive. Because's fseek's offset argument is usually a signed long integer, on 32-bit systems UnZip will not find any file that is more than 2 GB from the beginning of the archive. And on 64-bit systems, UnZip won't find any file that's more than 4 GB from the beginning (since the zipfile format can only store offsets that big). So the last file in the archive can potentially be arbitrarily large (in theory, anyway--we haven't tested this), but the combined total of all the rest must be less than 2 GB or 4 GB, respectively.

So unfortunately, unless you can find another application that can read and decompress the file, then you would have to move to a 64 bit system or update your system to CentOS 7 which ships with unzip 6.0, or compile unzip 6.0 on your CentOS 5 machine and run it from your home directory perhaps.

From unzip 6.0

[snip].. Zip archive entries larger than 4 GiBytes

3

Make a copy of the file then try zip -FF <filename>.

From the man page (man zip)

-F    Fix the zip archive. This option can be used if some portions
      of the archive are missing. It is not guaranteed to work, so 
      you MUST make a backup of the original archive first.

      When  doubled as in -FF the compressed sizes given inside the
      damaged archive are not trusted and zip scans for special
      signatures to identify the limits between the archive members.
      The single -F is more reliable if the archive is not too much
      damaged, for example if it has only been truncated, so try this
      option  first.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.