Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I list the files in a zip archive 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? That is, how can I list the different files compressed within my .zip archive?

like image 261
einpoklum Avatar asked Mar 20 '13 07:03

einpoklum


People also ask

How can I view a ZIP file without extracting it?

Using Vim. Vim command can also be used to view the contents of a ZIP archive without extracting it. It can work for both the archived files and folders. Along with ZIP, it can work with other extensions as well, such as tar.

How do I list gzip files?

To list all the contents of a compressed gzip archive (or any kind of tar file), use the -t option with tar. We'll also need the -f option, since we will specify the name of our tar file after. This will return a full list of all the files and directories that reside inside the archive.

How can I edit a ZIP file without extracting it?

open archive in archive manager. open text file in KDE gui editor. save text file and system ask you to refresh archive - click yes.


1 Answers

Use unzip with -l option:

unzip -l file.zip 
like image 136
perreal Avatar answered Oct 02 '22 08:10

perreal