Open In App

bzdiff command in linux with examples

bzdiff command in Linux is used to compare the bzip2 compressed files. Bzcmp and bzdiff are used to invoke the cmp or the diff program on bzip2 compressed files. All options specified are passed directly to cmp or diff. If only one file is specified, then the files compared are file1 and an uncompressed file1.bz2. If two files are specified, then they are uncompressed if necessary and fed to cmp or diff. The exit status from cmp or diff is preserved.

Synopsis:



bzcmp [ cmp_options ] file1 [ file2 ]
bzdiff [ diff_options ] file1 [ file2 ]

Example 1: Comparing two files as follows:

Example 2: Here, we will use bzdiff with Single parameter. bzdiff utility compares the file1.bz2 and file1

Article Tags :