LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 02-02-2012, 04:41 PM   #1
bnbntx
LQ Newbie
 
Registered: Jan 2012
Posts: 17

Rep: Reputation: Disabled
corrupt zip file..


Has anyone ever successfully corrected a corrupt zip archive? If so is there a "wiz-bang" Linux app/tool that can achieve this? Already tried basic zip fix commands. I think the corruption may have come from tar'ing the file, zipping the file then including it within another file. Really can't remember exactly what I did to be honest. I've DL'ed and used an eval windows program that claims to fix 40% but the other 60% is skipped. Any ideas on what may be tried?
 
Old 02-03-2012, 02:51 AM   #2
b0uncer
Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
If the situation is that bad (about half and half), I doubt if anything saves you, at least anything auto-magical. Any un/archiving tool should work so that the unarchiving an archived data results in the original data; if you've archived it several times over, something is not working right if the outcome of reversing the process is not the original data. I'd say you should dump that corrupt file into trash, get the original data again and start all over. If you can't get the original data....well, you should have made backups (or whoever gave it to you).
 
Old 02-03-2012, 05:01 PM   #3
jefro
Guru
 
Registered: Mar 2008
Posts: 5,959

Rep: Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584
One of the great things about zip is the simple ways it uses to test archive. It was the best way and still is in my opinion to send files. The problem is the simple test used is not very good at providing guidance when fixing, it only knows damage. I think it is a parity along with filesize.
 
Old 02-03-2012, 11:45 PM   #4
John VV
Guru
 
Registered: Aug 2005
Location: Ann Arbor Mi.
Distribution: OpenSUSE 11.4 & Scientfic Linux 6.1
Posts: 7,285

Rep: Reputation: 706Reputation: 706Reputation: 706Reputation: 706Reputation: 706Reputation: 706Reputation: 706
have you looked at the "help" page ?
Code:
zip --help
.... output....
-F   fix zipfile (-FF try harder)
or the man page ?
Code:
man zip
Quote:
I think the corruption may have come from tar'ing
if you did that on Linux then not likely the problem

now if you did that ON a windows OS then ?????


but if you made a tarball first THEN zipped it , that is normal
it would be a *.tar.gz , *.tar.bz2 ,*.tgz,


try untaring it
 
Old 02-06-2012, 11:20 AM   #5
lbukys
LQ Newbie
 
Registered: Mar 2008
Posts: 7

Rep: Reputation: 0
repairing a corrupt zip file

The turn-key zip repair programs don't fix corrupted data, they just fix bad checksums or bad internal directory information, which enables unzip programs to extract something, corrupt or not.

A common scenario for zip file corruption is FTP transfer in ASCII mode (which systematically destroys some of the data -- say, 0.15% of the bits can be lost). That's very hard to fix but not impossible; I documented an example of a successful receovery at my web site. It's not a turn-key process, though: it requires knowledge of the correct format of the uncompressed file, and lots of computation to perform a heuristic search. Brute-force search of all possible repairs does not work (except for tiny files) because the search space is huge. So for truly important and otherwise irretrievable data, it's possible, but it's a consulting project.
 
Old 02-06-2012, 11:46 AM   #6
bnbntx
LQ Newbie
 
Registered: Jan 2012
Posts: 17

Original Poster
Rep: Reputation: Disabled
I'm convinced that the zip file was ftp'ed in ascii mode which explains the issue. If I remember correctly it was transferred by a .ksh ftp script that I never fully worked out the kinks of determining weather files were exe's or txt/(ascii/bin). I'd like to revisit this script along with 1000+ others but it's in this corrupt zip file...lol Thanks for your input though. Might be a little over my head but nothing I can't keep learning about. Thank you again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting 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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find out a file in a WAR which in a zip without unzip the zip-file? thomas2004ch Linux - Software 3 09-30-2011 03:06 PM
Zip File Backups Corrupt SlowCoder Linux - General 1 04-23-2007 07:54 PM
corrupt zip file - NEED HELP!!! FNC Linux - Software 2 10-29-2006 12:09 PM
create a self-extracting zip file with zip on solaris? samsolaris Solaris / OpenSolaris 3 10-15-2004 01:50 AM
Corrupt Zip/OpenOffice file - any way to fix? gazurtoids Linux - Software 0 12-09-2003 03:39 AM


All times are GMT -5. The time now is 08:47 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration