外部 Diff 工具介绍
GNU Diffutils
Classic command-line utilities including diff, diff3, sdiff, and cmp for comparing files and directories in scripts and shells.
类型
Command line
授权
GNU GPL
平台
Linux, macOS, Unix, Windows via ports
适合场景
Automation, CI scripts, Unix-style workflows, patch generation, and environments where a stable command-line diff is required.
优点
- Ubiquitous and scriptable
- Stable output formats
- Works well in automation
限制
- Text-first command-line UX
- No visual merge UI
- Binary/media comparison is limited
核心能力
diff, diff3, sdiff, cmp
Unified and context diff formats
Directory comparison
Patch-friendly output
安装说明
Linux: usually preinstalled or available as diffutils.macOS: system diff is available; GNU version via brew install diffutils.