2

Suppose I have a ZIP archive myfiles.zip. To list the files inside the ZIP file, I could do zip -sf myfiles.zip, which results in:

Archive contains:
  files/mypic.jpg
  files/myvideo.mp4
Total 2 entries (12345678 bytes)

Is there a way to list these files together with their file sizes? For example:

Archive contains:
  files/mypic.jpg  1234
  files/myvideo.mp4  456789
  ...
Flux
  • 2,938

1 Answers1

3

You can use command like:

unzip -lv myfiles.zip

Here is example output of this command:

# unzip -lv zz.zip
Archive:  zz.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
      94  Defl:N       79  16% 02-18-2020 08:53 7be876f8  z1
     539  Defl:N      218  60% 02-18-2020 08:54 34711128  z2
    3234  Defl:N      250  92% 02-19-2020 14:06 46aba2a1  z3
--------          -------  ---                            -------
    3867              547  86%                            3 files
Romeo Ninov
  • 17,484