Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 created these two zip files about 24 hours apart.

$ ls -l /tmp/*.zip
-rw-rw-r-- 1 scott scott 1401289 Mar 21 20:11 /tmp/
-rw-rw-r-- 1 scott scott 1401289 Mar 22 19:29 /tmp/

You can see they're the same size, because the directory being zipped hasn't changed.

However, these files have been viewed in the last 24 hours, so their access times have changed. For this reason, I can't compare the zips using diff or cmp.

What would a way to reliably compare their contents be? For example, I am considering comparing the output of

ls -l <file> | awk '{print $5}'

on the two files. Is there a better solution?

share|improve this question
up vote 5 down vote accepted


zipcmp compares the zip archives zip1 and zip2 and checks if they contain the same files, comparing their names, uncompressed sizes, and CRCs. File order and compressed size differences are ignored.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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