Zipping is simply the process of compressing files or folders into a single file in order to save storage space. Zipping is also done to keep all related files in a single place for easy access. So when downloading to a computer it takes only lesser time than usual. A zip file usually has a ZIP extension in it. Zip is the most popular format to compress files. Zip is available for all operating systems. Here the guide will help you to how to zip or unzip a file in Linux below,
- Here, I will give you quick tips to Zip and Unzip files in ubuntu.
- Make sure Zip support is installed.
How to zip a file in Linux?
Zipping a file using Linux GUI.
- Keep all the files or folders that you want to zip in a single file for easy access.
- Select the files or folders that you want to Zip.
- Right-click and select ”compress”
- In Zip, tar xz or 7z format, you can create a compressed file.
- Name the file.
- Click on “create”
Unzipping is the process of extracting a Zip file in order to convert it into the original file size.
How to Zip files using Zip commands?
Files can be Zipped using Zip commands. But here I will share the easiest one.
Syntax for using Zip command.
Output _file_name input1
Syntax to create a Zip folder.
Zip -r output_files.zip file1
The -r option compress the content. And a Zip extension
To add files to the compressed folder.
Zip -r myzip aish-1.txt
adding: aish-1.txt(stored 0%)
adding: sample_directory/(stored 0%)
Unzipping is the process of extracting files from the compressed files. That is when you zip a file, it’s original size is reduced to smaller size in order to save space. While you unzip the same file it’s size revert back to it’s original size.
How to unzip a file in Linux?
- Open file manager.
- Navigate to the folder you want to unzip.
- Right-click on the file.
- Select the option “extract here”.
- And then new folder under the same name will be created.
To unzip an entire folder,
Right-click on the folder, select “extract all”
Unzip using command lines.
# unzip compression.zip
There is another option “extract to”. This option is to specify where you want to extract the files.
How to zip or unzip a file in Linux is now very really simple.