Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a large zip file and a limited amount of disk space. Can I determine how much space the expanded contents will take without decompressing the file?

share|improve this question
up vote 28 down vote accepted

You can do that by using the 'unzip' command with the "list" flag:

unzip -l

That will output a listing of every file in the zip along with its size in bytes, and the final line will be the total decompressed size in bytes.

share|improve this answer
If we know that the archive contains a huge number of files, we can prevent a long output by using tail to only display the last 10 lines (or with -n you can specify the number of lines). Example: unzip -l | tail -n 15 – Byte Commander Nov 10 '15 at 17:12

When you open a ZIP-file with the archive manager, it tells you the size of the contained files.

If you want to know how much all or some contained files are, just mark them (to mark all files: CTRL+A) and take a look at the bar on the bottom.enter image description here

share|improve this answer

protected by Eliah Kagan Sep 8 '13 at 2:38

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.