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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s