Skip to content
Latchkey

unzip -l, -v and -q: List and Quiet Output

unzip -l lists entries without extracting, -v adds compression method and CRC, and -q silences the per-file extraction log.

Before extracting or shipping an archive, listing it confirms the expected files are present; -v shows how each was stored; -q keeps the extraction itself out of noisy CI logs.

What it does

unzip -l lists each entry with its uncompressed size, modification date, and name, plus a total, without extracting. unzip -v is a verbose listing that also shows the compression method (Stored or Defl:N), ratio, and CRC-32 per entry. During extraction, unzip normally prints "inflating: <file>" per entry; unzip -q suppresses that listing (and -qq is quieter still) while keeping errors visible.

Common usage

Terminal
unzip -l artifact.zip
# verbose: see compression and CRC per entry
unzip -v artifact.zip
# verify a specific path exists in the archive
unzip -l artifact.zip | grep 'index.js'
# quiet extraction, overwrite, into a directory
unzip -q -o artifact.zip -d ./out

Options

FlagWhat it does
-lList entries (name, size, date)
-vVerbose list with compression method, ratio, CRC
-qQuiet, suppress the per-file listing on extraction
-qqQuieter, suppress more informational output
-tTest integrity instead of listing

In CI

Use unzip -l as a cheap gate: confirm the deployment package has the handler at the top level before pushing the artifact, piping the listing through grep as an assertion. The -v CRC column is the reliable way to tell whether two archives hold the same file bytes even when compression differs. Pair -q with -o for a clean, non-interactive extraction; -q hides the file list but not the overwrite prompt, so it can still hang without -o.

Common errors in CI

"End-of-central-directory signature not found" when listing means the file is not a valid zip (truncated download, wrong file, or an HTML error page saved as .zip). "cannot find zipfile directory in one of <name>" is the same class of problem. If -l shows fewer entries than expected, the archive was built without -r or with -j collapsing names. Because -q also hides some warnings, re-run without it when debugging a missing-file problem.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →