Lesson 3.1: Archiving Files on the Command Line

Archiving is the process of grouping together files into one easy file. In Linux, this is known as tar. Tar only archives, but compression can be added to shrink the files using the following:

Compression comes in two main types: lossy and lossless

Lossy refers to parts of compressed files that cannot be recovered due to the type of algorithm used. Lossy is used for images, videos, and audio.

When to use lossy types?

due to the nature of the quality loss, it tends to be imperceptible to humans

Lossless algorithms are capable of placing the file back to its original form once decompressed. The most common files that would noticeable when lost such as executables and log files

Compression levels: Different types of compression programs are capable of different compression efficiencies. Most to least compression

  1. xz - highest compression, but slowest (unxz to decompress)
  2. bzip2 (bunzip2 to decompress)