Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

bzip2

High compression ratio file compressor

Syntax

bzip2 [OPTION]... [FILE]...

Common Options

-dDecompress
-kKeep original file
-cWrite to stdout
-fForce overwrite
-1Fastest compression
-9Best compression
-tTest integrity
-vVerbose output
-zForce compress

Common Examples

bzip2 file.txt

Compress file

bzip2 -k file.txt

Compress keeping original

bzip2 -d file.txt.bz2

Decompress file

bzip2 -9 file.txt

Best compression ratio

bzip2 -c file.txt > file.bz2

Compress to stdout

bzip2 -t file.txt.bz2

Test integrity

Related Commands

Related Tools

More Code & Dev Tools