diff do?compare two files line by line and show the differences.
▸ Explain your own diff command →$ diff -u old.txt new.txt
$ diff -r dir1/ dir2/
| -u | unified format — the diff style used by patches and git |
| -r | recursively compare any subdirectories found |
| -i | ignore case differences |
| -w | ignore all whitespace |
| -b | ignore changes in the amount of whitespace |
| -q | report only whether files differ, not the details |
| -N | treat absent files as empty (with -r) |
| -C | output the given number of lines of copied context |
| -U | output the given number of lines of unified context |
Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.