View list of files in ZIP archive on Linux
--
Track title: CC B Schuberts Piano Sonata No 16 D
--
Chapters
00:00 Question
00:18 Accepted answer (Score 746)
00:39 Answer 2 (Score 191)
01:00 Answer 3 (Score 124)
01:16 Answer 4 (Score 65)
01:32 Thank you
--
Full question
https://superuser.com/questions/216617/v...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#linux #zip
#avk47
ACCEPTED ANSWER
Score 801
The less
utility is capable of peeking into a zip
archive. In fact, if you look at the outputs of unzip -l zipfile
and less zipfile
, you will find them to be identical.
ANSWER 2
Score 208
Try unzip -l files.zip
Or unzip -l files.zip | less
if there are too many files to be listed in one page.
Also, See man unzip
for more options
ANSWER 3
Score 70
Please use
vim ZIP_FILE_NAME
for the same. This is a simple and easy to remember one.
ANSWER 4
Score 17
You can make the zip appear as a directory (in which you use cd
, ls
, etc.) by mounting it with the fuse-zip virtual filesystem.
mkdir foo.d
fuse-zip foo.zip foo.d
ls foo.d
cat foo.d/README
...
fusermount -u foo.d
rmdir foo.d
Another relevant FUSE filesystem is AVFS. It creates a view of your entire directory hierarchy where all archives have an associated directory (same name with #
tacked on at the end) that appears to hold the archive content.
mountavfs
ls ~/.avfs/$PWD/foo.zip\#
cat ~/.avfs/$PWD/foo.zip\#/README
...
umountavfs
Many modern file managers (e.g. Nautilus, Dolphin) show archive contents transparently.
AVFS is read-only. Fuse-zip is read-write, but beware that changes are only written to the zip file at unmount time, so don't start reading the archive expecting it to be modified until fusermount -u
returns.