A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/linux-unix/bzcmp-command-in-linux-with-examples/ below:

bzcmp command in Linux with examples

bzcmp command in Linux with examples

Last Updated : 11 Jul, 2025

The

bzcmp

utility is used to invoke the

cmp

utility on bzip2 compressed files. All options specified are passed directly to

cmp

. As internally

bzcmp

calls

cmp

, We can pass the

cmp

command options to

bzcmp

.

Syntax:
bzcmp [cmp_options] file [file]
Example 1:

Comparing two files as follows:

In the above example, bzcmp compares the

file1.bz2

and

file2.bz2

and returns the first-byte position where the data differs.

Example 2:

Here, we will use

bzcmp

with Single parameter. Edit the compressed file

file1.bz2

and replace the content from "

GeeksForGeeks bzcmp example file1.

" to "

GeeksForGeeks bzcmp example file1 changed.

" and execute the following command. bzcmp utility compares the

file1.bz2

and file1.

Note:

The output from

cmp

refers to temporary file name instead of a specified filename. To check the difference of contents in compressed(bz2) files you can use

bzdiff

command.



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4