Monday 14 May 2018

How to zip/unzip the directory in Linux with command line

This article will describe, how to zip and unzip a directory and directory in Linux using command line. Zip is a compression and file packaging utility which is available for Linux, UNIX, Windows and various Operating systems.

Run the following command to check zip utility is installed or not:

[root@linuxcnf ~]#  rpm -q zip
package zip is not installed
package unzip is not installed
[root@linuxcnf ~]# 

If it is not installed in system then follow the link how to install zip and unzip command in Centos 7:

Use the given below command to zip a directory:

[root@linuxcnf ~]# zip -r  /path/to/directory

The directory compressed and zipped with file name

Run the following command to unzip a zip file:

[root@linuxcnf ~]# unzip

The file will unzip!!!

No comments:

Post a Comment