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.
The Pictures folder can be compressed as pictures.zip by executing following command.
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.
Unzip Directory
Execute the following command to unzip pictures.zip. The command will create the directory named as Pictures inside example directory.
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.
Hence, we have discussed almost more than enough about compressing and uncompressing of the folders.