Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803
Rep:
New version of "unzip"?
Does anyone know if there's a newer version of "unzip" than "5.52"?
I got a call from a user at work that was having trouble with a batch job that pulls a file from an FTP site and unzips it in preparation for loading into a database. The local server is running a copy of unzip 5.50 that was compiled from Info-ZIP's sources (ages ago). Last month they started having trouble with their batch process (which is why they waited until this month to contact me ) not being to unzip the downloaded file. An error message:
Code:
missing 7 bytes in zipfile
is displayed before you even get the prompt for the password. After you enter the password, another error message:
Code:
invalid compressed data to inflate
is displayed followed by a message about "bad zipfile offset" and "attempting to re-compensate". When it's all done, only about 195K of data has been extracted from the 300K+ archive.
After some fiddling around that involved copying the downloaded archive file to a few different systems (UNIX/Linux/Windows), I found that the only place I could unzip the file was on an XP box using Winzip 9.0. All of the UNIX systems (Tru64 if it makes a difference which I highly doubt) were using unzip 5.50. The Linux system I attempted to unzip the file on was using V5.52. The latest version I seem to find available (on Sourceforge) is 5.52 from the Info-ZIP project page and that seems to be from early 2005. (So downloading that and recompiling it would probably be a waste of time.)
Anyone know of a newer version of unzip or some other tool that is able to deal with the (apparently) newer ZIP file format?
is displayed before you even get the prompt for the password. After you enter the password, another error message:
Code:
invalid compressed data to inflate
I don't know much about ZIP archives, but from Googling that error, it looks like the most common cause is the downloader attempting to convert carriage-returns and line-feeds in the downloaded file, believing it to be text (eg with a TEXT-mode FTP transfer).
If that's true then it may be possible that the ZIP utility is a red herring, and it's just the downloader that's borked the file. Are you sure that the FTP transfer is being done in binary mode?
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803
Original Poster
Rep:
Quote:
Originally Posted by rjlee
Are you sure that the FTP transfer is being done in binary mode?
Yes. I copied the file that had been loaded from the FTP site by the Tru64 system onto the Linux and XP systems. I'm (all too) aware of the Windows FTP client's default of TEXT mode transfers and have made it a practice to issue a "bin" command before any file transfers (even on UNIX-to-UNIX transfers where BINARY is the default).
I can only assume that the original file itself seems to be okay since Winzip was able to unpack it without error. I don't follow developments in the Winzip arena. I'm guessing they found some burning need to alter the archive format. (Probably to sucker folks into buying the latest copy of the program.)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803
Original Poster
Rep:
Quote:
Originally Posted by amani
Use 7-zip...7z.. It is more capable
I've grabbed the p7zip sources. Looks promising (I guess). I'll have to see how recent the version of gcc is on the Tru64 system where I compile those utilities. I'l try p7zip out on the Linux box first and see how it handles the oddball zipfile we've encountered.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.