Whenever it comes to transferring files from one place to another via emails or any other suitable communication medium, we always think of compressing those files somehow so that they can be transported easily. One such way of doing it is by zipping the target file or folder. In this article, we will be using the Zip utility to zip a folder in Linux Mint 20.
Using the Zip Utility to Zip a Folder in Linux Mint 20:
For using the Zip utility to zip a folder in Linux Mint 20, you will have to perform the steps shown below:
Step # 1: Get your System Ready:
First, we will get our system ready with the following command:
$ sudo apt update
Step # 2: Install the Zip Utility on your System:
Now, we will install the Zip utility on our system with the command shown below:
$ sudo apt install zip
Step # 3: Confirm the Installation of the Zip Utility on your System:
We can confirm the installation of this utility by running the following command:
$ zip --version
The version of this utility is shown in the image below:
Step # 4: Zip a Folder using the Zip Utility on your System:
Now, we can zip any folder of our choice using this utility by executing the following command:
$ zip –r Sample.zip /home/kbuzdar/snap
In this command, “-r” is a flag which represents one of the many options that can be used with the “zip” utility. “Sample.zip” represents the name of the new zip folder to be created whereas “/home/kbuzdar/snap” refers to the complete path of the folder that we wanted to zip.
The confirmation messages shown in the image below will be displayed upon a successful execution of the above-mentioned command.
Step # 5: Confirm if the Selected Folder has been Zipped or not:
Finally, we can confirm if the selected folder has been zipped or not by going to the same path that we had provided for our target folder. You can see that a zip folder has been created with our provided name as shown in the following image:
In this way, you can use the Zip utility to zip your folders of any specific size on Linux Mint 20, and hence those folders can be moved from one place to another very easily.
Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications including CCNA RS, SCP, and ACE. As an IT engineer and technical author, he writes for various websites.