Ubuntu

Zip command in Ubuntu


 

Zipping a File

Format : zip <filename.zip> dir1 dir2…..

Example : zip abc.zip test1/ test2/

This creates a zip file abc.zip with the contents of  folders test1 and test2

 

Unzipping a File

Format : unzip <filename.zip>

Example : unzip abc.zip

This unzips the contents of abc.zip to the current directory location

 

Unzipping a File to a specific folder

Format : unzip <filename.zip> -d dirname/

Example : unzip abc.zip -d unzip_dir/

This creates a folder unzip_dir and then unzips the contents of abc.zip to that folder.

 

Regards,

The NonsenseBlogger

Advertisements