This program is not generally used to compress files in Linux, but it is quite often required to decompress archives from a Windows OS.
The following table lists the zip command and its description with some examples:
Command |
Description |
zip backup * |
Compresses all files in the present working directory and puts them inside backup.zip |
zip -r backup.zip /home/student/abc |
Archives the files and directories stored in /home/student/abc in the backup.zip file |
unzip backup.zip |
Extracts all the files from the backup.zip in the current directory |
The examples of the zip and unzip commands are shown in the following screenshot: