= qdiff == Basics === Info

= qdiff  == Basics === Info
= qdiff
== Basics
=== Info
qdiff - quick binary files differ
=== Source
http://www.nongnu.org/qdiff/
http://savannah.nongnu.org/projects/qdiff
http://git.savannah.gnu.org/gitweb/?p=qdiff.git
=== Description
'qdiff' is a binary files differ that can detect binary
insertions/deletions/substitutions with colorful outputs.
It is released under GPL version 2.
=== Features
The differences can be printed in various ways, very colorful output
(insertions/deletions/substitutions), simple yet effective syncro engine,
useful and fast for large files with few differences (e.g. verifying
correctness of grabbed cdda data).
== Help
=== Usage Help
--------------------------------------------------------------------------Usage: qdiff [OPTION]... FILE1 FILE2
diff options:
-b --byte-by-byte
-f --no-heuristics
differing
compare files byte by byte, like 'cmp'
do not use heuristics to speed up large
blocks, note that the result is always correct
but
with this option you may find a smaller number
of
-m --min-match=NUM
NUM
differing bytes
allow resynchronisation only after a minimum of
bytes match, this is an important parameter:
lower
values may result in a more detailed analysis or
in
useless results, higher values give a coarse
analysis
but resynchronisation is more robust
(range=[1..],
-O --large-files
disk
default=20)
optimize disk access for large files on the same
(locks 16MB mem)
output modes: (override
-a --formatted
-u --unformatted
-x --hex
-t --vertical
output options:
-c --no-color
-C --alt-colors
like)
-w --width=NUM
width)
-B --bytes-per-line=NUM
-T --tab-size=TABSIZE
default=8)
-l --line-numbers
-n --no-line-break
-L --show-lf-and-tab
-S --show-space
-U --unprintable=CHAR
modes
-H --control-hex
-A --alignment-marks
-e --stop-on-eof
mode
--hide-match
--hide-deletion
--hide-insertion
--hide-substitution
--range-match
--range-deletion
--range-insertion
--range-substitution
-R --range
common options:
-v --verbose
-P --progress
-h --help
--version
automatic file type determination)
print formatted ascii text, line by line
print unformatted ascii text, block by block
print hex dump, block by block
print one byte per line (ignores width)
disable ansi coloring of output
no bold ansi coloring (for SGI terminals and the
output maximal NUM chars (default is terminal
print NUM bytes/chars per line
TABSIZE in formatted mode (range=[1..],
print line numbers in formatted mode
truncate (not break) lines in formatted mode
show newline/tab as <LF>/<HT> in formatted mode
show space as <SPC> in non hex modes
print CHAR for unprintable chars in non hex
print control codes in hex (<x1B>, not <ESC>)
print -/+ before 32/64-bit words in hex mode
stop when end of a file is reached in vertical
do not print matches
do not print deletions
do not print insertions
do not print substitutions
print match as byte range
print deletion as byte range
print insertion as byte range
print substitution as two byte ranges
print everything as byte range
verbose execution
show progress during work
print this help message, then exit successfully
print version, then exit successfully
qdiff version 0.9.1
*** (C) 1997-1999 by Johannes Overmann
*** (C) 2008 by Tong Sun
--------------------------------------------------------------------------=== Build & Installation
Type:
./configure
make
make install
If you want to debug use:
make CXXFLAGS="-Wall -W -g"
instead of
make
== Usage examples
=== Example 1, where are the symbol tables in executables
Let's build an executable with debug symbols embedded:
make clean
make CXXFLAGS="-Wall -W -g"
Then strip it after making a copy:
cp qdiff qdiff.dbg
strip qdiff
$ ls -l qdiff.dbg qdiff
-rwxr-xr-x 1 tong tong 211640 10-21 10:06 qdiff
-rwxr-xr-x 1 tong tong 814499 10-21 10:06 qdiff.dbg
Wow, quite a difference. What has 'strip' done?
qdiff -R qdiff.dbg qdiff
image:qdiff1.png[]
FYI, I made an alias for this 'qdiff -R' command for myself:
$ alias diffb
alias diffb='qdiff -R'
With it you can
diffb bin_file1 bin_file2
=== Example 2, dvdauthor magic tricks
Let's see what magic tricks have been played to mpeg videos after making
it
into DVD VOB file.
First we use dvdauthor to turn an mpeg video into DVD:
$ dvdauthor -o dvdauth -t test.mpg
. . .
INFO: Generating VTS with the following video attributes:
INFO: MPEG version: mpeg2
INFO: TV standard: pal
INFO: Aspect ratio: 16:9
INFO: Resolution: 704x576
INFO: Audio ch 0 format: ac3/6ch, 48khz drc
$ dvdauthor -o dvdauth -T
. . .
INFO: dvdauthor creating table of contents
INFO: Scanning dvdauth/VIDEO_TS/VTS_01_0.IFO
Now let's see what has happened:
diffb test.mpg dvdauth/VIDEO_TS/VTS_01_1.VOB
image:qdiff2.png[]
These two examples are just one way of using the qdiff's many output
options
to look at the changes. Check out the above "Usage Help" for more
options.
Enjoy.
== Author
- The 'qdiff' is written by Johannes Overmann.
- Latest maintainer is Tong Sun, http://xpt.sourceforge.net/
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement