bzip2
bzip2 is a Linux command in the Archives & Compression category, rated intermediate difficulty. Compresses files using Burrows-Wheeler algorithm (.bz2). The syntax is bzip2 [options] [file]. It returns compressed .bz2 file. A practical example: bzip2 file.txt # Creates file.txt.bz2 bzip2 -k file.txt # Keep original bzip2 -9 file.txt # Maximum compression A close relative is tar, which creates and extracts tar archives. The standard Unix archiving tool. A close relative is gzip, which compresses files using Lempel-Ziv coding. Produces .gz files. A close relative is gunzip, which decompresses .gz files created by gzip. More about this category: Linux archive commands — tar, gzip, zip, unzip, and more. Compress and extract files and archives. Related Archives & Compression commands: tar, gzip, gunzip, zip, unzip, xz, zcat, bunzip2. This page is part of the free Linux Reference documentation covering 304+ commands, each with syntax, options, practical examples, and a difficulty rating.