Finding what differs.
WHAT diff DOES
Shows the differences between two files.
WHAT THE USEFUL FORM IS
Unified output, which shows context around each change.
WHY CONTEXT MATTERS
A change without surrounding lines is difficult to place.
WHAT TO USE IT FOR
Comparing a configuration file against its backup Checking what an update changed Comparing two servers' settings
WHAT diff ON DIRECTORIES DOES
Reports files present in one and not the other, and differences in common files.
WHAT THE RECURSIVE OPTION ADDS
Descending into subdirectories.
WHAT TO ADD FOR LARGE TREES
Options to report briefly rather than showing every difference.
WHAT CHECKSUMS PROVIDE
Confirmation that two files are identical, without comparing them line by line.
WHY THAT IS BETTER ACROSS MACHINES
You compare small lists rather than transferring files.
HOW TO COMPARE TWO DIRECTORIES ACROSS SERVERS
Produce a sorted checksum list on each, then diff the lists.
WHAT rsync WITH A DRY RUN PROVIDES
A list of what would change, which is a practical difference report.
WHAT TO USE FOR CONFIGURATION DRIFT
That comparison, run periodically.
WHAT TO INVESTIGATE
Any difference you cannot explain.