3 Ways to View Zip & Archive Contents Without Extracting in Mac OS X

Jun 17, 2013 - 10 Comments

Zip file Wondering what is in that zip file or archive you downloaded, but you don’t want to extract it to find out? Maybe you are hunting around in a see of archives for a specific file you zipped up a while ago, but you’re not quite sure which archive contains it? You can easily peer into zips and other archive formats to view their contents without actually unzipping or uncompressing them, which is an excellent way to check if a particular archive has a file or folder you are looking for, and to make sure you downloaded the proper file.

There are a few easy ways to view zip contents on a Mac and we’ll cover three of them, two of which are zip-centric command line based and built into all versions of OS X (and many other unix and linux variations for that matter), and another approach which uses a free third party utility and Quick Look to be able to quickly glance at any archives contents.

Viewing Zip Archive Contents with zip info

The most informative for zips and perhaps the easiest to remember is the ‘zipinfo’ command. At it’s most basic usage, it requires no flags or anything fancy, just point it at a zip file and you’ll see a full list of the archives contents, the file size of each item within the archive, file count, total size of the zip, the read/write/execution permissions per file, file modification date and time, the compression level and efficacy of the compression, and of course, the file names. All of this information is revealed without uncompressing the zip.

zipinfo archivename.zip

Here’s an example of the command and some sample output, remember output always looks cleaner in the terminal than it does on a webpage:

$ zipinfo archive.zip
Archive: archive.zip 1743 bytes 5 files
-rw-r--r-- 2.1 unx 4068 bX defN 11-May-13 14:25 magicsample.conf
-rw-r--r-- 2.1 unx 204 bX defN 16-May-13 09:38 magicfile
-rw-r--r-- 2.1 unx 132 bX defN 21-May-13 12:44 testingsomething.txt
5 files, 4486 bytes uncompressed, 991 bytes compressed: 77.9%

The zipinfo command will only work for zip archives, and it will not view the contents of password protected zips.

Checking Zip Contents with unzip

Another way to see the contents of zips is to use the familiar ‘unzip’ command with a simple -l flag. The reported information is not as detailed as ‘zipinfo’ but it still includes meaningful details including individual file size, file modification date and time, total file count, and file names.

unzip -l archivename.zip

Sample output of the command is shown below:

$ unzip -l archive.zip
Archive: archive.zip
Length Date Time Name
-------- ---- ---- ----
4068 05-11-13 14:25 magicsample.conf
204 05-16-13 09:38 magicfile
132 05-21-13 12:44 testingsomething.txt
-------- -------
4486 5 files

For most uses it’s probably best to use the zipinfo command, if not for it’s simplicity, than for it’s extended reporting of archive contents. One advantage to unzip however is that it appears on more unix platforms than zipinfo, meaning you should find it to be compatible with almost any OS you run across, whereas zipinfo is often not as common to come across. Nonetheless, zipinfo is bundled in virtually every version of Mac OS X so if you’re primarily a Mac user you should never have issues using it, even if you’re stepping back in time with a very early OS X version.

Again, unzip -l will only view the contents of .zip files, so if you’re looking for an all-encompassing solution for viewing the contents of many archive formats go with the BetterZipQL utility we’ll cover next.

Viewing Contents of Any Archive Without Extraction via Quick Look

If you’d rather not dig around in the command line, you can use a free third party Quick Look plugin to view the contents of zips and nearly any other archive files without extracting them. Called “BetterZip QuickLook Generator”, the plugin is easy to install and to use, and it works with the latest versions of OS X. BetterZipQL is great for a few reasons, it’s quick and simple to use thanks to Quick Look’s easy access from the space bar, plus it supports much more than zip, allowing you to view all of the following archive formats without extracting them: ZIP, TAR, GZip, BZip2, ARJ, LZH, ISO, CHM, CAB, CPIO, RAR, 7-Zip, DEB, RPM, StuffIt’s SIT, DiskDoubler, BinHex, and MacBinary. Nice huh?

To use BetterZipQL to view the contents of all these archive formats, you’ll need to download and install BetterZipQL first, here is how to do that, plus how to use it once you’ve gone through the simple installation process:

  • Download BetterZip for Quicklook here and uncompress it
  • From the Finder, hit Command+Shift+G to summon Go To Folder and go to /Library/QuickLook/
  • Drag the unzipped BetterZipQL.qlgenerator file into that /Library/QuickLook/ folder
  • Open Terminal and restart the Quick Look daemon for the plugin to load:
  • qlmanage -r

  • Find any zip file in the Finder, select it, then hit the Spacebar to view the contents

The viewed zip (or other archive) will look like the following, you can interact with folders and hierarchies to dig deeper into archive formats if desired:

View Archive contents without extraction with BetterZipQL

BetterZipQL is great but the interface is clearly designed for earlier versions of OS X, thus it looks a little out of place with the more subtle lighter appearances of newer versions of Quick Look. Nonetheless, it still works great and the funky mismatched appearance is hardly any reason to not download it and use the awesome free utility.

What about viewing archives in iOS?

Not on a Mac but still need to see what’s in an archive? If you’re on the go with an iPhone, iPad, or iPod touch and want to check the contents of a zip, rar, sit, or many other archive formats, you can use the excellent free WinZip utility for purposes of viewing contents, plus it can also open and extract zips and other archive formats, you can read more about zips and iOS here if interested.

Heads up to MacWorld for the zipinfo trick and for finding the BetterZip Quick Look utility. I’ve been using the unzip -l tool for years and it’s always great to find new alternatives.

.

Related articles:

Posted by: Paul Horowitz in Mac OS, Tips & Tricks

10 Comments

» Comments RSS Feed

  1. Gaz says:

    what do we have for Mojave in 2020?
    betterzip doe snot seem to work, just get icon filename, size and date last modified, not a list of what is in the zip (which is what I actually want)

  2. bob says:

    Needs to handle Massive archives for RAR better.
    as in 500 parts of 1GB each.

    after dropping 1st part, the program just spins with no user feed back.
    would be nice if it showed what it was doing.

  3. breed7 says:

    How can we trust information from someone so unintelligent as to not know the difference between “it’s” and “its”?

    • Rob says:

      breed7 – You forgot the [/sarcasm] tag on your post. (Or you forgot an [/ignorant_jerk] tag, but I’m hoping it’s the former.)

  4. Guest says:

    The fact you have to download a third-party software or use your Terminal to VIEW the contents of a .zip file is utterly ridiculous. Another reason why Mac is terrible.

  5. afds says:

    Ugh. This basic stuff comes as standard on other OSs.

    • Rob says:

      Actually, the zip/unzip functionality didn’t used to be standard on Windows, and the current version is limited to very basic tasks. And Windows still can’t view or edit PDFs, which is standard on Macs. Linux (usually) includes extra utilities to handle all kinds of compressed files, but they’re not usually as friendly as Windows or Mac. Every OS has strengths and weaknesses; my experience is that if you ask someone what the “best” OS is, they’ll tell you the one they first learned on; after that, it’s the one they are most familiar with.

  6. Alex says:

    Thank you so much for the better zip for quick load tip!

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site