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.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Linux system queries.
In this context, we shall look into how to use the Zip utility to zip a folder in Linux Mint 20.
How to use the Zip Utility to Zip a Folder in Linux Mint 20 ?
To use the Zip utility to zip a folder in Linux Mint 20, you will have to perform the below steps.
1. Perform system update
First, we will get our system ready with the following command:
$ sudo apt update
2. Install the Zip Utility on your System
Now, we will install the Zip utility on our system with the below command:
$ sudo apt install zip
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
This command will display the version of Zip installed on your system.
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/linuxapt/snap
With 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/linuxapt/snap" refers to the complete path of the folder that we wanted to zip.
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.
[Need assistance in fixing Linux Mint system issues ? We can help you. ]