LinuxCommandLibrary

bzdiff

Compare bzip2 compressed files

TLDR

Compare two bzip2 compressed files

$ bzdiff [file1.bz2] [file2.bz2]
copy
Compare compressed file with uncompressed version
$ bzdiff [file.bz2]
copy
Compare with diff options
$ bzdiff -u [file1.bz2] [file2.bz2]
copy
Compare using cmp instead of diff
$ bzcmp [file1.bz2] [file2.bz2]
copy

SYNOPSIS

bzdiff [diffoptions] file1 [file2_]
bzcmp [cmpoptions] file1 [file2_]

DESCRIPTION

bzdiff compares bzip2 compressed files by decompressing them and passing the content to diff. All options are passed directly to the underlying diff command.
bzcmp works similarly but uses cmp instead of diff for byte-by-byte comparison.

PARAMETERS

All parameters are passed directly to diff or cmp:
-u

Unified diff format
-c
Context diff format
-i
Ignore case differences
-w
Ignore whitespace
-q
Report only whether files differ

BEHAVIOR

Single file

Compares file1 with file1.bz2 (uncompressed version)
Two files
Decompresses both if needed and compares

EXIT STATUS

Returns the exit status from diff or cmp, preserving the comparison result.

CAVEATS

Error messages refer to temporary filenames instead of original filenames. Files are decompressed to temporary storage during comparison.

SEE ALSO

diff(1), cmp(1), bzgrep(1), bzmore(1), bzip2(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community