Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8363305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:08:47+00:00 2026-06-09T12:08:47+00:00

Occasionally, we receive ZIP files from our suppliers that are seemingly corrupted. Attempting to

  • 0

Occasionally, we receive ZIP files from our suppliers that are seemingly corrupted. Attempting to list the contents of a ZIP will trigger an error like this:

    $>unzip -qql JABL_VER_20120808_165910.zip
unzip:  cannot find or open JABL_VER_20120808_165910.zip, JABL_VER_20120808_165910.zip.zip or JABL_VER_20120808_165910.zip.ZIP.

I did a quick read of the unzip man page and coded that snippet to trap the above error

EXIT=`echo $?`
case $EXIT in
> 0-1) echo "Unzip Complete.";;
> *) echo "Unzip Failed.";;
> esac
$>Unzip Failed.

It seems to work. However, there are cases like this one where the error is different:

$>unzip -qql JABL_VER_20120808_175915.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of JABL_VER_20120808_175915.zip or
        JABL_VER_20120808_175915.zip.zip, and cannot find JABL_VER_20120808_175915.zip.ZIP, period.

Is there a “surefire” way to trap errors like these?

PS: Not sure if matters but the ZIP files are generated on MS Windows ; We use Red Hat.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T12:08:49+00:00Added an answer on June 9, 2026 at 12:08 pm

    exit code 1 isn’t good either,
    1 one or more warning errors were encountered, but processing completed successfully anyway. This includes zipfiles
    where one or more files was skipped due to unsupported compression method or encryption with an unknown password.

    you should try

       unzip -t zipfilename
    

    and only accept exit code 0

    why do you have so many errors? ftp’d file in text mode?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Occasionally in our lab, our postgres 8.3 database will get orphaned from the pid
We recently received a report that our application will occasionally fail to run. I
Occasionally , we have to write methods that receive many many arguments , for
Occasionally I will know that there is a .NET Framework function that returns a
I have some functions which occasionally (not always) will receive a callback and run
I have class that extends 'IntentService' - this class occasionally receives data from a
Occasionally, my IIS 6 server will receive a request which contains a space after
I'm currently working on a multi-threaded application, and I occasionally receive a concurrently modification
We are running some sites that receive decent traffic and occasional leechers that hog
Occasionally a TextView with dynamic content will show a price. For example, as part

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.