Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Community > MacNN Lounge > Corrupted Zip File

Corrupted Zip File
Thread Tools
subego
Clinically Insane
Join Date: Jun 2001
Location: Chicago, Bang! Bang!
Status: Offline
Reply With Quote
Nov 19, 2016, 12:42 PM
 
I have a massive zip file filled with the proverbial "very important things" that's giving me an Error 2 "no such file or directory".

Yes. It was very stupid to put very important things in a zip.


Things I've tried

zip -F
zip -FF


Things I'm trying right now

ditto -x -k


Things to try

Multiple runs of zip -FF
Opening in Windows
Stuff suggested here
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Nov 19, 2016, 02:22 PM
 
The Unarchiver will unzip until it hits an error. Unless the error is at the beginning, you'll get at least some of the files.

Zipster will let you browse Zips as if they were folders, and work with files/folders inside individually. In particular, if the zip can be opened at all, it will let you pull out all the undamaged items.
     
subego  (op)
Clinically Insane
Join Date: Jun 2001
Location: Chicago, Bang! Bang!
Status: Offline
Reply With Quote
Nov 19, 2016, 02:33 PM
 
I've been able to pull stuff out before the error just using unzip, but the error is way too early.

I've moved to software alternatives. I'm trying BetterZip, if that gets me nowhere I'll try Zipster. Thanks!

I'm going under the assumption the whole archive isn't borked past the error. I don't know much about how zip works, but it looks like it's keeping files separate.
     
subego  (op)
Clinically Insane
Join Date: Jun 2001
Location: Chicago, Bang! Bang!
Status: Offline
Reply With Quote
Nov 19, 2016, 02:38 PM
 
Unzip just bails (without an error) on what appears to be a _MACOSX file. I tried a run of unzip excluding _MACOSX, but no dice. It still bails about a 10th of the way through.
     
CharlesS
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Nov 19, 2016, 03:04 PM
 
Shameless plug time: have you tried opening it with Pacifist? I can't guarantee it'll work if the file is corrupt, but the Zip file functionality is written from scratch, not using any existing code, so it's another independent Zip unarchiver, and thus worth a try. Pacifist lets you just pull out individual files without extracting the whole thing, so assuming the Central Directory Record is intact so it's possible to list the file's contents (and thus, possible for Pacifist to open it), you might be able to work around the files that are making things choke and extract the rest.

Alternatively, if you're okay with sending me the file to look at myself, I could peek at it with a hex editor and see how much of your stuff looks like it might still be in there. Support on the left side of the at sign, charlessoft.com on the right of it.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
subego  (op)
Clinically Insane
Join Date: Jun 2001
Location: Chicago, Bang! Bang!
Status: Offline
Reply With Quote
Nov 19, 2016, 03:11 PM
 
I shall give it a shot! FWIW I'm pretty sure I coughed up at some point in the distant past.

The offer to look at it is very kind, but it's... 168 GB.

Yes, this was all very stupid.
     
CharlesS
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Nov 19, 2016, 03:17 PM
 
Originally Posted by subego View Post
I shall give it a shot! FWIW I'm pretty sure I coughed up at some point in the distant past.

The offer to look at it is very kind, but it's... 168 GB.

Yes, this was all very stupid.
168 GB... ouch. What program (and what version) did you use to create it? This might just be a case of the archiver using the standard 32-bit Zip format instead of Zip64, resulting in it being impossible to correctly encode the offsets for a file over 4 GiB in size. This would probably prevent Pacifist from being able to extract it if true but the good news is that if this is the case, the data would all still be in there, and rescuable if you wrote a program for the task (since 168 GB is a bit more than I'd want to do by hand ).

Edit: to test that theory, does the file that it bails on occur at somewhere around 4 GiB into the file?

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
subego  (op)
Clinically Insane
Join Date: Jun 2001
Location: Chicago, Bang! Bang!
Status: Offline
Reply With Quote
Nov 19, 2016, 03:30 PM
 
It would have been compressed using the finder, and it was awhile ago, so I couldn't tell you the OS.

When I run zip -F it says the offsets are way wrong.

It's over 4GB but not a lot. I think. I've unzipped it a bunch of times and different ways and I feel like I've gotten different results. Would what I have possibly be more than 4GB because it's been expanded?

I'm running it through Pacifist right now, so I don't want to do another test unzip until I decide whether Pacifist is "I'm very busy" beachballing, or "you murdered me" beachballing.
     
subego  (op)
Clinically Insane
Join Date: Jun 2001
Location: Chicago, Bang! Bang!
Status: Offline
Reply With Quote
Nov 19, 2016, 03:37 PM
 
It was "very busy" beachballing.

But then my computer ran out of memory.
     
subego  (op)
Clinically Insane
Join Date: Jun 2001
Location: Chicago, Bang! Bang!
Status: Offline
Reply With Quote
Nov 19, 2016, 03:48 PM
 
Using unzip, I get about 11GB worth of files.
     
CharlesS
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Nov 19, 2016, 04:00 PM
 
Haha, looks like 168 GB Zip files are something I never got around to testing. Maybe for a later version.

Hang on, I'm going to whip something up.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
subego  (op)
Clinically Insane
Join Date: Jun 2001
Location: Chicago, Bang! Bang!
Status: Offline
Reply With Quote
Nov 19, 2016, 04:33 PM
 
Any whipping up would be much appreciated!

I just reran ditto, and it pulled 90 GB out... just not the right files yet.

It did ignore files unzip was able to pull, which gives me hope most of the data is in there, and I'm "simply" having an access problem.
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Nov 19, 2016, 05:34 PM
 
I wasn't aware Pacifist could handle zip files, or I would have suggested it too. Sorry Charles.
     
subego  (op)
Clinically Insane
Join Date: Jun 2001
Location: Chicago, Bang! Bang!
Status: Offline
Reply With Quote
Nov 19, 2016, 05:46 PM
 
You actually scored with Unarchiver! It let me skip the error files.

However it was unable to surmount the problem I'm such an idiot the files I was looking for weren't in there.
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Nov 19, 2016, 06:01 PM
 
... or they were amongst the error files?
     
CharlesS
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Nov 19, 2016, 06:25 PM
 
I made a little quick-n-dirty search tool to search through the ZIP file to find as many file records as it can find. Unlike zipinfo, this does a more-or-less blind search for the local file record signature, completely ignoring the overall structure, so it may turn up some false positives (if that happens, you'll probably get some things with "Error: Can't read filename" in them). See if it reveals your files.

http://www.charlessoft.com/zip_record_search.zip

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
subego  (op)
Clinically Insane
Join Date: Jun 2001
Location: Chicago, Bang! Bang!
Status: Offline
Reply With Quote
Nov 19, 2016, 10:09 PM
 
Completely awesome! Thank you!

I'll report back...
     
subego  (op)
Clinically Insane
Join Date: Jun 2001
Location: Chicago, Bang! Bang!
Status: Offline
Reply With Quote
Nov 19, 2016, 10:46 PM
 
Originally Posted by reader50 View Post
... or they were amongst the error files?
It was alerting me file by file, but I'm hoping I can double check with Charles' custom jobbie.
     
BadKosh
Professional Poster
Join Date: Aug 2007
Location: Just west of DC.
Status: Offline
Reply With Quote
Nov 20, 2016, 07:51 AM
 
This is why I over-back -up stuff. I have over 3000 tunes I transferred one at a time from Vinyl. A 3 year process. I copy the entire collection to a fairly new SATA Hard drive, remove the drive from the case and pack it in an antistat bag with label. Fall 2015 when my main hard drive crashed I was able to get the stuff back in a hurry. I also make copies of folders of important things like tax and insurance stuff onto DVD and lately 16GB thumb drives. I don't do any encryption or compression. Sorry for your loss.
     
subego  (op)
Clinically Insane
Join Date: Jun 2001
Location: Chicago, Bang! Bang!
Status: Offline
Reply With Quote
Nov 20, 2016, 12:17 PM
 
Well, I have copies of the corrupted file on three hard drives and in the cloud, so it's definitely backed up.

Compressing it shaved off 100GB. Still quite dumb, but five years ago, when my server was half the size it is now, I couldn't escape the lure.
     
CharlesS
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Nov 20, 2016, 09:40 PM
 
Well, compressing the stuff isn't stupid per se, and I've done it myself with a number of things—but ZIP isn't the best choice of formats to use for things that large, due to the fact that the 64-bit version doesn't have complete support.

Was my custom tool able to locate any records for your files?

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
subego  (op)
Clinically Insane
Join Date: Jun 2001
Location: Chicago, Bang! Bang!
Status: Offline
Reply With Quote
Nov 20, 2016, 10:31 PM
 
It definitely seems bad from an "all in one basket" perspective.

I forgot to mention... I tried it, but the computer I've been doing this on is 10.10, and the tool looks to be asking for 10.12. I'll hike it over to a different computer with a more current OS.
     
CharlesS
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Nov 20, 2016, 11:49 PM
 
Oh, sorry about that. I could probably recompile it for 10.10, if you need.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
subego  (op)
Clinically Insane
Join Date: Jun 2001
Location: Chicago, Bang! Bang!
Status: Offline
Reply With Quote
Nov 21, 2016, 12:49 AM
 
Thank you very much sir for yet another kind offer!

I should be good though... I just happened to upgrade on another computer.
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 04:03 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,