Tarball File 〈Bonus Inside〉

: Because a raw .tar file is not compressed, it is customary to "filter" it through a compression utility. This creates a "compressed tarball" that is significantly smaller and more efficient for transfer. Common Extensions and Compression Types Compression Method Description .tar Pure archive; no size reduction. .tar.gz / .tgz The most common standard for Linux software. .tar.bz2 Slower but offers higher compression ratios than Gzip. .tar.xz

tar -xf archive.tar.gz --wildcards "*.txt"

| Compression | Speed (compress) | Speed (decompress) | Ratio | Use case | |-------------|----------------|-------------------|-------|-----------| | None ( .tar ) | Instant | Instant | 1:1 | Tape, streaming, intermediate | | gzip ( .tar.gz ) | Fast | Fast | Medium | General purpose (best balance) | | bzip2 ( .tar.bz2 ) | Slow | Medium | Good | Legacy systems | | xz ( .tar.xz ) | Very slow | Medium | Very good | Distribution source code | | zstd ( .tar.zst ) | Fast | Fast | Good | Modern backups (Linux kernel 5.9+) | tarball file

Report prepared on: April 14, 2026 Based on GNU tar 1.34+ and POSIX.1-2017 specifications.

The tar utility is standard on Linux and macOS. The following flags are most frequently used: : tar -cvf archive.tar /path/to/directory -c : Create a new archive. -v : Verbose (shows files as they are added). -f : Specifies the filename. Extracting an Archive : tar -xvf archive.tar.gz -x : Extract files. : Because a raw

# Uncompressed tar -cf archive.tar /path/to/dir

You simply add the flag for gzip compression: The tar utility is standard on Linux and macOS

Unix permission fidelity, symlinks, easy streaming (e.g., tar -c ... | ssh host 'tar -x' ), and widespread tool support.

tar -xf archive.tar.gz # auto-detects compression tar -xzf archive.tar.gz # explicit gzip tar -xjf archive.tar.bz2 # explicit bzip2