Ade Malsasa Akbar contact
Senior author, Open Source enthusiast.
Tuesday, May 19, 2020 at 14:00

Continuing the basic tutorial, this one is file archiving with compression. Compression means reduction in file size. In this tutorial you will learn more which archive file formats support compression and which ones do not and how to compress files into one archive. This tutorial is based on Ubuntu version 20.04 LTS and can be applied to any other version. Happy working!


(Ubuntu showing compressed files and contents of a compressed file)

Subscribe to UbuntuBuzz Telegram Channel to get article updates directly.


Compression Formats


  • zip - archive and compression format, compatible with all operating systems.
  • 7zip - very good compression format, the best one before xz.
  • gzip - compression only format, created by The GNU Project, de facto in our community.
  • bz2 - compression only format, free and open and patent-free, very popular in free software community.
  • xz - compression only format, resulting to the smallest file, originated in Slackware community, new de facto in our community.

(Compression results of one 18.4MB folder into five different formats)

No Compression Formats


  • tar - archive only format.
  • cpio - the legacy archive format still used within unix-like systems.
  • iso - known as the format of operating system or CD image, actually an archive format.

1. Compress To 7ZIP


  • Right-click a file, folder, or multiple items.
  • Compress.
  • Select 7z format "Smaller archives but must be installed on Windows and Mac".
  • OK.
  • Wait for the process.
  • An archive file with .7z format created.
 
(Picture 1.1 the easiest compression done in File Manager)

2. Compress To GZIP


  • Run Archive Manager program.
  • The program window appears on screen.
  • Click menubar File > New Archive.
  • Give name of the file.
  • Select .tar.gz format.
  • Click Add Files button.
  • Select file, folder, or multiple items at once.
  • OK.
  • Items added to the archive.
  • Close Archive Manager.

(Picture 2.1 creation of archive by Archive Manager)


(Picture 2.2 adding files into archive file)

3. Compress To BZ2


  • Run Archive Manager program.
  • The program window appears on screen.
  • Click menubar File > New Archive.
  • Give name of the file.
  • Select .tar.bz2 format.
  • Click Add Files button.
  • Select file, folder, or multiple items at once.
  • OK.
  • Items added to the archive.
  • Close Archive Manager.

(Picture 3.1 compressing into .tar.bz2 format)

4. Compress to XZ


  • Run Archive Manager program.
  • The program window appears on screen.
  • Click menubar File > New Archive.
  • Give name of the file.
  • Select .tar.xz format.
  • Click Add Files button.
  • Select file, folder, or multiple items at once.
  • OK.
  • Items added to the archive.
  • Close Archive Manager.
 
(Picture 4.1 compressing into the best ratio .tar.xz format)


This article is licensed under CC BY-SA 3.0.