rz-diff - Man Page
Compare files and find binary differences.
Synopsis
| rz-diff | [OPTIONS] file0 file1 | 
Description
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.
- -A
 Compare virtual addresses from file0 with physical addresses in file1
- -a [arch]
 Specify the architecture plugin to use for analysis (e.g., x86, arm)
- -b [bits]
 Specify the register size for the chosen architecture (e.g., 16, 32, 64)
- -B
 Run 'aaa' when loading the binary
- -C
 Disable the use of colors in the output
- -d [algo]
 Compute the edit distance between files using the chosen algorithm:
- myers
 Eugene W. Myers' O(ND) algorithm (no substitution)
- leven
 Levenshtein O(N^2) algorithm (with substitution)
- ssdeep
 Context triggered piecewise hashing comparison
- -e [k=v]
 Set an evaluable config variable
- -H
 Enable hexadecimal visual mode for comparing files in hexadecimal format
- -h
 Display the help message
- -i
 Use command line arguments instead of files (only for -d)
- -j
 Output the comparison results in JSON format
- -q
 Generate quiet output with minimal information
- -0 [cmd]
 Input for file0 when option -t 'commands' is given
- -1 [cmd]
 Input for file1 when option -t 'commands' is given
- -S [WxH]
 Set the width and height of the terminal for visual mode
- -t [type]
 Compute the difference between two files based on the specified type:
- bytes
 Compare raw bytes in the files (only for small files)
- lines
 Compare text files
- functions
 Compare functions found in the files
- classes
 Compare classes found in the files
- command
 Compare command output returned when executed in both files. Requires -0 <cmd>, -1 <cmd> is optional.
- entries
 Compare entries found in the files
- fields
 Compare fields found in the files
- graphs
 Compare 2 functions and outputs in graphviz/dot format. Requires -0 <fcnname|offset>, -1 <fcn name|offset> is optional.
- imports
 Compare imports found in the files
- libraries
 Compare libraries found in the files
- sections
 Compare sections found in the files
- strings
 Compare strings found in the files
- symbols
 Compare symbols found in the files
- -T
 Show timestamp information in the output
- -V
 Show version information for rz-diff
- -v
 be more verbose (stderr output)
Palette colors can be changed by adding the following lines inside the $HOME/.rizinrc file
- ec diff.unknown blue
 offset color
- ec diff.match green
 match color
- ec diff.unmatch red
 mismatch color
Example
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:
See Also
rizin(1), rz-find(1), rz-hash(1), rz-bin(1), rz-asm(1), rz-gg(1), rz-run(1), rz-ax(1),
Authors
pancake <pancake@nopcode.org> 
 byteninjaa0
Referenced By
rizin(1), rz-asm(1), rz-ax(1), rz-bin(1), rz-find(1), rz-gg(1), rz-hash(1), rz-run(1), rz-sign(1).