GNU Diffutils
Classic command-line tools for finding differences. Includes diff, diff3, sdiff, cmp.
Открытый исходный кодКомандная строка
Windows, macOS, Linux⭐⭐⭐Free (GPL v3)
Описание
GNU Diffutils is a package of several command-line programs for finding differences between files. It includes diff, diff3, sdiff, and cmp - the foundational tools used by almost all other diff software. Essential for scripting and automation.
Ключевые функции
- diff: compare files line by line
- diff3: compare three files at once
- sdiff: merge two files interactively
- cmp: compare two files byte by byte
- Multiple output formats (context, unified, side-by-side)
- Available on virtually all Unix-like systems
- Fully scriptable and automatable
- Part of GNU Project
Установка
# Usually pre-installed on Linux/macOS
# Ubuntu/Debian
sudo apt install diffutils
# macOS (via Xcode Command Line Tools)
xcode-select --install
# Windows (via Git Bash or WSL)Использование
# Compare two files (unified format)
diff -u file1.txt file2.txt
# Compare three files
diff3 file1.txt file2.txt file3.txt
# Interactive merge
sdiff -o merged.txt file1.txt file2.txt
# Binary comparison
cmp file1.bin file2.binПлюсы
- +Available everywhere by default
- +Fast and reliable
- +Essential for scripts and automation
- +Multiple output formats
- +Well documented
Минусы
- -Command-line only, no GUI
- -Output can be hard to read
- -No image/binary comparison
- -No merge GUI
Краткая информация
- Тип
- Открытый исходный код
- Платформы
- Windows, macOS, Linux
- Цена
- Free (GPL v3)
- Категория
- Командная строка
- Популярность
- ⭐⭐⭐
Альтернативы
- Delta
- Meld
- diff-so-fancy
Похожие инструменты
diff-so-fancy
Good-lookin' diffs. A tool that makes your diffs human-readable instead of machine-readable.
Meld
Visual diff and merge tool for developers. Compare files, directories, and version controlled projects.
KDiff3
Free diff and merge program for comparing or merging two or three files/directories.
WinMerge
Open Source differencing and merging tool for Windows. Compare folders and files visually.