OS Manuals

rz-diff(1)

RZ_DIFF — Compare files and find binary differences

RZ_DIFF(1) General Commands Manual RZ_DIFF(1)

RZ_DIFF — Compare files and find binary differences

rz-diff [OPTIONS] file0 file1

rz-diff compares two files or binary programs and highlights the differences between them. It supports diffing different aspects like raw bytes, text lines, functions, sections, strings, etc., based on the options used.

Compare virtual addresses from file0 with physical addresses in file1
arch
Specify the architecture plugin to use for analysis (e.g., x86, arm)
bits
Specify the register size for the chosen architecture (e.g., 16, 32, 64)
Run 'aaa' when loading the binary
Disable the use of colors in the output
algo
Compute the edit distance between files using the chosen algorithm:
Eugene W. Myers' O(ND) algorithm (no substitution)
Levenshtein O(N^2) algorithm (with substitution)
Context triggered piecewise hashing comparison
k=v
Set an evaluable config variable
Enable hexadecimal visual mode for comparing files in hexadecimal format
Display the help message
Use command line arguments instead of files (only for -d)
Output the comparison results in JSON format
Generate quiet output with minimal information
cmd
Input for file0 when option -t 'commands' is given
cmd
Input for file1 when option -t 'commands' is given
WxH
Set the width and height of the terminal for visual mode
type
Compute the difference between two files based on the specified type:
Compare raw bytes in the files (only for small files)
Compare text files
Compare functions found in the files
Compare classes found in the files
Compare command output returned when executed in both files. Requires -0 <cmd>, -1 <cmd> is optional.
Compare entries found in the files
Compare fields found in the files
Compare 2 functions and outputs in graphviz/dot format. Requires -0 <fcnname|offset>, -1 <fcn name|offset> is optional.
Compare imports found in the files
Compare libraries found in the files
Compare sections found in the files
Compare strings found in the files
Compare symbols found in the files
Show timestamp information in the output
Show version information for rz-diff
be more verbose (stderr output)

Palette colors can be changed by adding the following lines inside the $HOME/.rizinrc file

offset color
match color
mismatch color

Compare two binary files using the default settings:

rz-diff file1.bin file2.bin

Compare two text files and display the output in JSON format:

rz-diff -j -t lines file1.txt file2.txt

Compare two functions from an architecture plugin:

rz-diff -t graphs -0 function1 -1 function2 binary1 binary2

rizin(1), rz-asm(1), rz-ax(1), rz-bin(1), rz-find(1), rz-gg(1), rz-hash(1), rz-run(1)

pancake <pancake@nopcode.org>

byteninjaa0

August 25, 2023 Linux 4.19.0-gvisor

rizin 0.9.1-r2 · os · ingested 2026-10-31