Friday, August 23, 2013

Zip Unzip Linux Command Examples

Zip & Unzip Linux Command Examples

Zip Unzip Linux Command Examples

The following Linux command examples illustrate typical uses of the command unzip for un-packaging "archive" files, also called "zip files" in the terminal. 

To Create a zip or archive file test.zip and put all the files in the folder or directory to compressed or zipped

$ zip data *

Note : No need to add .zip extension or suffix as it is added automatically by zip command.

To use unzip to extract all files of the archive test.zip into the current directory & sub-directories
To extract a *.zip compressed file:

$ unzip test.zip
View the contents of *.zip file (Without unzipping it):
$ unzip -l test.zip

Archive:  test.zip

  Length     Date   Time    Name
 --------    ----   ----    ----
    40995  11-30-98 23:50   META-INF/MANIFEST.MF
    32169  08-25-98 21:07   classes_
    15964  08-25-98 21:07   classes_names
    10542  08-25-98 21:07   classes_ncomp


Zip Unzip Linux Command Examples

No comments:

Post a Comment

Linux Tips and tricks,Online Linux Helpers