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/inc1.zip
-rw-rw-r-- 1 scott scott 1401289 Mar 22 19:29 /tmp/inc2.zip
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?