Monthly Archives: March 2015

check the content of zip file in linux

On linux server, you can run either “unzip -l” or “zipinfo”

e.g $ zipinfo data.zip
Archive:  data.zip   363181 bytes   10 files
-rw-r–r–  2.3 unx      404 tx defN 26-Aug-14 02:51 auser.xml
-rw-r–r–  2.3 unx   206354 tx defN 18-Jul-13 08:12 full_test.xml
-rw-r–r–  2.3 unx     2212 bx defN 13-Oct-14 07:28 identity.jks
-rw-r–r–  2.3 unx      846 tx defN  4-Feb-14 06:00 a2-.xml
-rw-r–r–  2.3 unx    22624 tx defN 19-Feb-15 07:35 list
-rwxrwxrwx  2.3 unx    15327 tx defN 19-Aug-14 05:58 l.sh
-rwxr-x—  2.3 unx   364982 bx defN  6-Mar-15 04:08 d.jar
-rw-r–r–  2.3 unx     1197 tx defN 19-Aug-14 10:00 l.ldif
-rw-r–r–  2.3 unx     2173 tx defN 10-Mar-15 03:26 1.properties
-rw-r–r–  2.3 unx      372 tx defN 19-Aug-14 09:55 5.ldif
10 files, 616491 bytes uncompressed, 361679 bytes compressed:  41.3%

$ unzip -l data.zip
Archive:  data.zip
Length     Date   Time    Name
——–    —-   —-    —-
404  08-26-14 02:51   auser.xml
206354  07-18-13 08:12   full_test.xml
2212  10-13-14 07:28   identity.jks
846  02-04-14 06:00   a2.xml
22624  02-19-15 07:35   list
15327  08-19-14 05:58   l.sh
364982  03-06-15 04:08   d.jar
1197  08-19-14 10:00   l.ldif
2173  03-10-15 03:26   1.properties
372  08-19-14 09:55   5.ldif
——–                   ——-
616491                   10 files

Leave a comment

Filed under Linux