einpoklum einpoklum - 4 months ago 9
Bash Question

How can I list the contents of a zip file without decompressing it?

How can I get the equivalent of an

ls
of a .zip file (not gzip), without decompressing it, from the command shell?

Answer

Perreal's answer is right, but I recommend installing atool (look for it in your distribution's package manager). Then, for any kind of archive file, bzip2, gzip, tar... you have just one command to remember :

als archive_name