RZ-DIFF(1)

πŸ“¦
version 0.8.2 Β· 2 versions
, in arch rolling, epel 10, epel 9, fedora 43, fedora 44, nixos 26.05

πŸ’– RZ_DIFF β€” like, the manual page for rz-diff (that's the RZ-DIFF(1) page bestie, section 1) πŸ’–

okay so picture this: you got two files. two binaries. two whole vibes. and you need to know what's different between them. that's it. that's the whole thing. rz-diff is your girl for this. let's go πŸ¦‹


✨ SYNOPSIS ✨

rz-diff [OPTIONS] file0 file1

🌸 DESCRIPTION 🌸

so rz-diff takes two files or binary programs, compares them, and highlights the differences between them. like a glow-up reveal but for bytes. πŸ’…

and it's not just raw bytes either β€” it can diff a bunch of different aspects, depending on which options you pass: raw bytes, text lines, functions, sections, strings, etc. etc. pick your fighter.

πŸŽ€ the options, bestie πŸŽ€

  • -A β€” compare virtual addresses from file0 with physical addresses in file1
  • -a [arch] β€” tell it which architecture plugin to use for analysis (think x86, arm)
  • -b [bits] β€” set the register size for whichever architecture you picked (think 16, 32, 64)
  • -B β€” run 'aaa' when loading the binary
  • -C β€” disable colors in the output (no fun allowed mode, but valid)
  • -d [algo] β€” compute the edit distance between the files with the algorithm you pick:
    • 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 β€” turn on hexadecimal visual mode so you can compare files in hex 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 type you pick:
    • bytes β€” compare raw bytes in the files (only for small files, fr)
    • 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 check!! 🌈 you can change the palette colors 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:

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

πŸ‘‘ 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

and that's the whole page, bestie!! 🫢 this one's from Aug 25, 2023, it's the RZ_DIFF(1) manual, and it ate. go diff something. mwah πŸ’…βœ¨

πŸ“¦ where this page comes from
  • arch rolling: rizin 0.8.2-2 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND CC-PDDC AND CC0-1.0 AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND LGPL-3.0-only AND MIT
  • epel 10: rizin 0.7.4-5.el10_1 Β· LGPL-3.0-or-later AND GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND MIT AND Apache-2.0 AND MPL-2.0 AND Zlib
  • epel 9: rizin 0.7.4-5.el9 Β· LGPL-3.0-or-later AND GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND MIT AND Apache-2.0 AND MPL-2.0 AND Zlib
  • fedora 43: rizin 0.7.4-9.fc43 Β· LGPL-3.0-or-later AND GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND MIT AND Apache-2.0 AND MPL-2.0 AND Zlib
  • fedora 43: rizin 0.7.4-9.fc43 Β· LGPL-3.0-or-later AND GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND MIT AND Apache-2.0 AND MPL-2.0 AND Zlib
  • fedora 44: rizin 0.7.4-9.fc43 Β· LGPL-3.0-or-later AND GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND MIT AND Apache-2.0 AND MPL-2.0 AND Zlib
  • fedora 44: rizin 0.7.4-9.fc43 Β· LGPL-3.0-or-later AND GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND MIT AND Apache-2.0 AND MPL-2.0 AND Zlib
  • nixos 26.05: rizin 0.8.2
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms