#rdif
rdif is a recursive diff tool tuned for network configuration files. Unlike
diff, which is line-oriented and treats configuration text as
a flat stream, rdif understands the block structure used by common vendor
syntaxes and compares configurations at the level of stanzas, sub-stanzas,
and individual statements.
The practical effect is that rdif ignores cosmetic noise — trailing whitespace, reordering of statements that are semantically commutative, quoted timestamps — and surfaces only the changes that matter.
#Installation
curl -L -O https://vkdev.net/downloads/rdif
chmod +x rdif
sudo mv rdif /usr/local/bin/
#Usage
The basic form takes two files and prints their structural differences.
rdif old.cfg new.cfg
--dialect ios|junos|eos|nxos|generic if the
file is unusual or if you want stricter parsing.
For directories, rdif walks both trees and pairs up files with matching names. This is the recursive mode and is the reason for the name.
rdif --recursive snapshots/2024-Q4/ snapshots/2025-Q1/
#Output format
- (removed), + (added), or ~
(modified) marker and the affected line. Use --format json to
produce machine-readable output for pipelines.