Is there a command to list the compressed file sizes for files within a .zip file?

Will Bradley

I'd like to see the absolute size in bytes of each file that has been compressed into single zip file. Having read the zip man page, I'm not sure that that utility can do it. This is on Mac OS X.

Something like:

$zip list myarchive.zip

file1.jpg 100 bytes compressed 3000 bytes uncompressed
file2.jpg 130 bytes compressed 3440 bytes uncompressed
n0pe

You can use the unzip utility with the -v flag:

unzip -v files.zip

Archive:  files.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
       0  Stored        0   0% 11-23-2011 15:02 00000000  file1
       0  Stored        0   0% 11-23-2011 15:02 00000000  file2
--------          -------  ---                            -------
       0                0   0%                            2 files

Note: The file sizes here are 0 because I made test files of zero length.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Extracting byte sizes of files within a zip file

Julia: Extract Zip files within a Zip file

Is there a terminal command to list folder size and corresponding file sizes within on Ubuntu 14.04 (Trusty Tahr)?

How to mix files of compressed and stored types in the same zip file

Finding a file within recursive directory of zip files

Listing the contents of zip files within a tar file

Reading files inside a subdir within a zip file

get file list of files contained in a zip file

List the directories whose the file sizes are all within a range

Using a batch file, can I rename files within a ZIP file?

List file sizes in GitHub

Command to check HDFS file is compressed or not

Using Python to add a list of files into a zip file

How to list recursive file sizes of files and directories in a directory?

Read first file in a list of files within a directory

file compressed through command "pv" are different from ordinary compressed file

Zip/Tar file compressed to larger size?

Using SevenZip to extract Zipped files within a zip file

Zip files that match certain data pattern within the file

Read Only File System view files within .zip

Extracting files from deep within a zip file in python

How to extracts files that are in folder within the zip file with inno setup?

Embed ZIP files directly within a PowerShell script, not in a separate file

Why do WinRAR and 7-Zip see different files when opening the same compressed file?

How to user Scanner check if a Zip file compressed by CSV or other type of files in JAVA?

Download zip file locally to tempfile, extract files to tempfile, and list the files

Batch command to delete files from file list

How to list files by file owner in Unix command?

How to update multiple compressed files with 7zip command line?