vkdev.net logo Networker's apps
Contact: vk@vkdev.net
Download rdif

#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/
[ screenshot of rdif output — replace this ]
rdif output for two revisions of the same configuration.

#Usage

The basic form takes two files and prints their structural differences.

rdif old.cfg new.cfg
rdif autodetects the configuration dialect from the file contents. You can override this with --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/
[ diagram: structural diff vs. line diff — replace this ]
rdif compares at the block level, not line by line.

#Output format

Each change is reported as a path through the configuration tree followed by a - (removed), + (added), or ~ (modified) marker and the affected line. Use --format json to produce machine-readable output for pipelines.