How to zip and unzip directories on CentOS.

Introduction

Zip is an archive file format that supports lossless data compression. A .zip file may contain any number of compressed files. The format was created by Phil Katz in 1989. Zipping is extremely useful when it comes to transfer large amount of data. Most operating system has built in support for .zip in similar manners.

Zip Directory

We have created a directory example and copy the Pictures directory inside which contains some JPG files. Execute ls command to list the files.

CentOS How to zip and unzip directories on CentOS

The Pictures folder can be compressed as pictures.zip by executing following command.

CentOS How to zip and unzip directories on CentOS 1

Now, if we list the files then we are going to get a new compressed file named as pictures.zip which is the result of the execution of previous command.

CentOS How to zip and unzip directories on CentOS 2

Unzip Directory

Execute the following command to unzip pictures.zip. The command will create the directory named as Pictures inside example directory.

CentOS How to zip and unzip directories on CentOS 3

Extra Info

We can ask for help if we need to know more about zipping and unzipping the folders. Execute the following command for this purpose.

CentOS How to zip and unzip directories on CentOS 4

Hence, we have discussed almost more than enough about compressing and uncompressing of the folders.


Next TopicInstall MongoDB




Latest Courses