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.

  1. Keep all the files or folders that you want to zip in a single file for easy access.
  2. Select the files or folders that you want to Zip.
  3. Right-click and select ”compress”
  4. In Zip, tar xz or 7z format, you can create a compressed file.
  5. Name the file.
  6. 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.

Zip (option)

Syntax for using Zip command.

Output _file_name input1

Input2

Syntax to create a Zip folder.

Zip -r output_files.zip file1

folder1

The -r option compress the content. And a Zip extension

To add files to the compressed folder.

Zip -r myzip  aish-1.txt

aish-2.txt sample_directory

adding: aish-1.txt(stored 0%)

adding:aish-2.txt(stored 0%)

adding: sample_directory/(stored 0%)

Sample_directory/newfile.txt

(Stored 0%)

Sample_directory/agatha.txt

(deflated 41%)

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?

  1. Open file manager.
  2. Navigate to the folder you want to unzip.
  3. Right-click on the file.
  4. Select the option “extract here”.
  5. 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

Archive: compressfile.zip

Extracting: file10

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.

Share.
Exit mobile version