Back to the command reference

bzip2

ArchivesFundamentalsReference only

Compress with bzip2 (smaller but slower than gzip)

Name: bzip2: a Burrows–Wheeler compressor (version 2)

This command is outside what the site lets you practise (mostly distribution-specific or rarely used tools). This page describes how to use it; try it on your own Linux system.

Description

bzip2 compresses with the Burrows–Wheeler transform into .bz2 files, usually smaller than gzip but slower.

Syntax

bzip2 [OPTION]... FILE...

Common options

-d / --decompressDecompress
-k / --keepKeep the original
-c / --stdoutWrite to standard output
-9 / --bestBest compression (the default)
-t / --testCheck that the file is intact
-f / --forceOverwrite existing files
-v / --verboseShow the ratio

Examples

  • $ bzip2 -k data.csv

    Produces data.csv.bz2

    Explain

Related