bzdiff - Unix, Linux Command


Advertisements

Previous Page
Next Page  
 

NAME

bzdiff: compare bzip2 compressed files

SYNOPSIS

bzdiff [ diff_options ] file1 [ file2 ]

DESCRIPTION

bzdiff is used to invoke the diff program on bzip2 compressed files. All options specified are passed directly to diff.

EXAMPLES

EXAMPLE-1:

To Find the difference of two bzip2 files using bzdiff:

$ bzdiff system_proc_1.bz2 system_proc_2.bz2

output:

1d0
<
26,43d24
< nubo 2297 1476 0 11:36 ? 00:00:00 /usr/lib/telepathy/mission-contr
< nubo 2320 1641 0 11:36 ? 00:00:00 zeitgeist-datahub
< nubo 2325 1476 0 11:36 ? 00:00:00 /usr/bin/zeitgeist-daemon
< nubo 2331 1476 0 11:36 ? 00:00:00 /usr/lib/x86_64-linux-gnu/zeitge
< nubo 2340 2331 0 11:36 ? 00:00:00 /bin/cat
< root 2352 1 0 11:36 ? 00:00:00 /usr/sbin/cupsd -f
< nubo 2387 1641 0 11:37 ? 00:00:00 update-notifier
< nubo 2409 1641 0 11:38 ? 00:00:00 /usr/lib/x86_64-linux-gnu/deja-d
< nubo 2419 1476 0 11:41 ? 00:00:01 /usr/lib/unity/unity-panel-servi
< root 2428 929 0 11:42 ? 00:00:00 sshd: nubo [priv]
< nubo 2481 2428 0 11:42 ? 00:00:00 sshd: nubo@pts/6
< nubo 2482 2481 0 11:42 pts/6 00:00:00 -bash
< root 2757 2 0 13:17 ? 00:00:00 [kworker/u2:2]
< nubo 2793 2482 0 13:29 pts/6 00:00:00 vi system_proc_1
< root 2794 929 0 13:30 ? 00:00:00 sshd: nubo [priv]
< nubo 2869 2794 0 13:30 ? 00:00:00 sshd: nubo@pts/13
< nubo 2870 2869 0 13:30 pts/13 00:00:00 -bash
< nubo 2895 2870 0 13:30 pts/13 00:00:00 ps -ef
For bzip2 compressed files, bzdiff command gives the differences of two bzip2 compressed files.

EXAMPLE-2:

To Find the difference of two  files using bzdiff:

$ bzdiff system_proc_1 system_proc_2

output:

1d0
<
26,43d24
< nubo 2297 1476 0 11:36 ? 00:00:00 /usr/lib/telepathy/mission-contr
< nubo 2320 1641 0 11:36 ? 00:00:00 zeitgeist-datahub
< nubo 2325 1476 0 11:36 ? 00:00:00 /usr/bin/zeitgeist-daemon
< nubo 2331 1476 0 11:36 ? 00:00:00 /usr/lib/x86_64-linux-gnu/zeitge
< nubo 2340 2331 0 11:36 ? 00:00:00 /bin/cat
< root 2352 1 0 11:36 ? 00:00:00 /usr/sbin/cupsd -f
< nubo 2387 1641 0 11:37 ? 00:00:00 update-notifier
< nubo 2409 1641 0 11:38 ? 00:00:00 /usr/lib/x86_64-linux-gnu/deja-d
< nubo 2419 1476 0 11:41 ? 00:00:01 /usr/lib/unity/unity-panel-servi
< root 2428 929 0 11:42 ? 00:00:00 sshd: nubo [priv]
< nubo 2481 2428 0 11:42 ? 00:00:00 sshd: nubo@pts/6
< nubo 2482 2481 0 11:42 pts/6 00:00:00 -bash
< root 2757 2 0 13:17 ? 00:00:00 [kworker/u2:2]
< nubo 2793 2482 0 13:29 pts/6 00:00:00 vi system_proc_1
< root 2794 929 0 13:30 ? 00:00:00 sshd: nubo [priv]
< nubo 2869 2794 0 13:30 ? 00:00:00 sshd: nubo@pts/13
< nubo 2870 2869 0 13:30 pts/13 00:00:00 -bash
< nubo 2895 2870 0 13:30 pts/13 00:00:00 ps -ef

EXAMPLE-3:

To Find the difference of two  files using bzdiff and see the output in two columns:

Here we have done the compairision  between two files name system_1 and system_2

cat system_1
line 1
line 2
line 3

cat system_2
liine
line 3
line4

$ bzdiff -y system_1 system_2

output:

line 1             | liine
line 2             <
line 3             line 3
                    > line4

EXAMPLE-4:

To Find the difference of two  files using bzdiff and output an ed script:

$ bzdiff -e system_1 system_2

output:


3a
line4
.
1,2c
liine
.

EXAMPLE-5:

To Find the difference of two  files using bzdiff and output an RCS format diff:

$ bzdiff -n system_1 system_2

output:

d1 2
a2 1
liine
a3 1
line4

 


Previous Page
Print
Next Page