Cannot open large concatenated zip file with unzip, though it opened fine with Archive Utility, get a central directory error

zip

I have downloaded a 7Gb zip file full of pdfs and movies in four (4) parts from an ftp server. I concatenate these four files into a single zip file on my machine and it unzip just fine with my Mac's Archive Utility.

However, when I upload these files to my Red Hat server, I am unable to unzip this concatenated zip file. I get this error:

Archive:  science_team_meeting_archive.zip
warning [science_team_meeting_archive.zip]:  2491989543 extra bytes at beginning or within zipfile
(attempting to process anyway)
error [science_team_meeting_archive.zip]:  start of central directory not found;
zipfile corrupt.
(please check that you have transferred or created the zipfile in the
appropriate BINARY mode and that you have compiled UnZip properly)

Ideas?

Best Answer

Try

zip -F science_team_meeting_archive.zip -O science_team_meeting_archive.fixed.zip

If that doesn't work, you just need more 'F's

zip -FF science_team_meeting_archive.zip -O science_team_meeting_archive.fixed.zip

If either of these work, you then unzip normally with:

unzip science_team_meeting_archive.fixed.zip 

For more info about this, use:

man zip