Find differences across two directory trees.

Section: diff, cmp, and patch-Oriented Comparison

Compare directories recursively

bash
bash
diff -ruN dir1 dir2
Explanation

A common way to inspect configuration or source tree differences.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing diff, cmp, and patch-Oriented Comparison
Show unified diff
Compare two text files with context.
OpenIn sheetbashsame section
Compare files byte by byte
Detect exact byte-level differences.
OpenIn sheetbashsame section
Show side-by-side diff
Compare files in two visual columns.
OpenIn sheetbashsame section
Pass stdin items as arguments
Convert lines into command arguments.
Split a file by line count
Create chunks of 1000 lines each.
Show most frequent error messages
Count and rank repeated lines in a log.