bzcmp - Unix, Linux Command


Advertisements

Previous Page
Next Page  
 

NAME

bzcmp - compare bzip2 compressed files

SYNOPSIS

bzcmp [ cmp_options ] file1 [ file2 ] 

DESCRIPTION

Bzcmp is used to invoke the cmp or the diff program on bzip2 compressed files. All options specified are passed directly to cmp . If only 1 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 . The exit status from cmp or diff is preserved.

 

EXAMPLES

EXAMPLE-1:

Compare bzip2 files using bzcmp :

$ bzcmp  system_proc_1.bz2 system_proc_2.bz2

in this case  system_proc_1.bz2 and system_proc_2.bz2 are two bz2 files used for this cmp operation.

output:

- /tmp/bzdiff.lC6TIpvEqf differ: byte 1, line 1


You can compare two bzip2 compressed file using bzcmp command. It internally uses cmp command to compare the content of the compressed contents. Here you can see the output of comparison of the two normal files and compressed files.

EXAMPLE-2:

Compare two files using bzcmp :

$ bzcmp system_proc_1 system_proc_2

output:

system_proc_1 system_proc_2 differ: byte 1, line 1

 

EXAMPLE-3:

To Compare bzip2 files using bzcmp with differing Bytes  

$ bzcmp -b system_proc_1.bz2 system_proc_2.bz2

output:


- /tmp/bzdiff.2jxonO45hc differ: byte 1, line 1 is 12 ^J 156 n

 

EXAMPLE-4:

To Compare bzip2 files using bzcmp with  output byte numbers and differing byte values.

 $ bzcmp -l system_proc_1.bz2 system_proc_2.bz2

output:

1    12    156
2    156  165
3    165  142

...

...

...

1840  164  157
1841  157  162
1842  162  12
cmp: EOF on /tmp/bzdiff.77Vmiur0nw

 

EXAMPLE-5:

To check output version information and exit:

$ bzcmp -v system_proc_1.bz2 system_proc_2.bz2

output:


cmp (GNU diffutils) 3.3
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Torbjörn Granlund and David MacKenzie.

 


Previous Page
Next Page