Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Peek inside zip archives from Terminal UNIX
Have you ever wanted to see what's in a Zip archive without unzipping it? Well, it turns out that there is a Terminal command you can use to do so: zipinfo. Just run zipinfo [filename] to get a list of files in an archive.

There are a number of interesting options to this command. The default behavior is to list the files in a short "ls -l" format, but you can also use the -m or -l options to have medium or long lists. You can use the -1 option to only show file names. And there are other useful options in the man zipinfo page.

One other useful item is the amount of space the archive takes up, and the amount of space saved. For example:

12 files, 10587791 bytes uncompressed, 9400060 bytes compressed: 11.2%

It's worth noting that this command has been around for a long time, and I was surprised to find that it's not mentioned here.
  • Currently 3.22 / 5
  You rated: 5 / 5 (9 votes cast)

Peek inside zip archives from Terminal | 1 comments | Create New Account
Click here to return to the 'Peek inside zip archives from Terminal ' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Peek inside zip archives from Terminal
Authored by: keirthomas on Jun 12, '13 09:31:53AM

By cannibalising a really old tip here on OS X Hints I created the following way of peeking inside zips from Finder. It uses Automator and the services menu:

I find this useful for giving a zip a final check over before I submit work somewhere, for example.

But the tip below this one for using Quick Look is probably the best method.

Author of Mac Kung Fu
Over 400 tips, tricks, hints and hacks for OS X
My tips blog:

[ Reply to This | # ]