What's the easiest way to use the "du" command on zip files? I'm sure this is quite a common use case, but I couldn't find anything using Google.
I'd rather not resort to mounting the zip file and running du as if it was an exploded directory.
What's the easiest way to use the "du" command on zip files? I'm sure this is quite a common use case, but I couldn't find anything using Google.
I'd rather not resort to mounting the zip file and running du as if it was an exploded directory.
I never heard of du
working for zip files, probably you should use gunzip
for that purpose - http://www.abeel.be/content/determine-uncompressed-size-gzip-file
I think you should better ask on http://superuser.com
Command for listing .zip archive is:
gunzip -l file.zip
For other formats I'll quote nice example from here:
Task: List the contents of a tar file
Use the following command:
$ tar -tvf file.tar
Task: List the contents of a tar.gz file
Use the following command:
$ tar -ztvf file.tar.gz
Task: List the contents of a tar.bz2 file
Use the following command:
$ tar -jtvf file.tar.bz2