How to Zip Files in Linux Easily!

0
2 min read

Zip is the most widely used file format that provides easy compressing of files without even loss of any quality. In this article, you gonna learn how you can zip and unzip Linux files easily.

Zip Linux files.

To Zip files and directories in Linux is a little bit difficult for a beginner. But I will try my best to explain you to the fullest. As Zip provides little to no data loss on compression it is widely used. We all use it without any hassle but it is quite complicated when comes to compression. Furthermore, In this article, you are going to learn how to use Zip and Unzip in Linux based OS such as Ubuntu or Parrot Sec, etc.

Install Zip in Linux.

If you haven’t installed Zip you can install it by entering all the commands listed below. But mostly it is installed in most of the Linux system. In case, it isn’t installed. You first need to install it.

Note: Mostly Linux Based OS Comes With Pre-installed Zip.

To check whether your system has installed zip and unzip or not you can use the following command:

zip -v && unzip -v 

After you enter the command. The system will probably give you a version of Zip and Unzip. If it gives well and good if it doesn’t gives then install zip and unzip. To install follow the below tutorial:

1.Update your system using :

sudo apt-get update

2. To install Zip, enter:

sudo apt-get install zip



3. To install Unzip, enter:

sudo apt-get install unzip

Zip files and Directories in Linux

To Zip files is just a piece of a cake. Let’s begin zipping,

To zip files in an archive, you’ll need to specify it something just like this:

sudo zip xyz.zip file1 file2 file3

To Suppress the output of archive use “-q”

sudo zip -q xyz.zip file1 file2 file3 file4

If you have to create a ZIP of a particular directory and its subdirectory altogether. You can use the “-r” command line

zip -r xyz.zip directory_name

Latest:

Create a password-protected Zip:

To create a password-protected Zip to ensure more security you can use “-e” command to encrypt it.

zip -e xyz.zip directory_name

Now it will ask you to enter your desired password that you wanna set for your zip archive.

Conclusion:

I hope you’ve understood everything about ZIP. If I had missed an important point, let me know in the comment section below or contact our team via contact us page. Thanks for landing on this article have a nice day dude 🙂

LEAVE A REPLY

Please enter your comment!
Please enter your name here