How can I list the files in a zip archive without decompressing it?

einpoklum picture einpoklum · Mar 20, 2013 · Viewed 65.9k times · Source

How can I get the equivalent of an ls of a .zip file (not gzip), without decompressing it, from the command shell? That is, how can I list the different files compressed within my .zip archive?

Answer

perreal picture perreal · Mar 20, 2013

Use unzip with -l option:

unzip -l file.zip