cmp

Compare two files.

Install

All systems
curl cmd.cat/cmp.sh
Debian Debian
apt-get install diffutils
Ubuntu
apt-get install diffutils
Alpine
apk add diffutils
Arch Arch Linux
pacman -S diffutils
image/svg+xml Kali Linux
apt-get install diffutils
CentOS
yum install diffutils
Fedora
dnf install diffutils
OS X
brew install diffutils
Raspbian
apt-get install diffutils
Docker
docker run cmd.cat/cmp cmp powered by Commando

Compare two files.

  • Find the byte number and line number of the first difference between the files:
    cmp file1 file2
  • Find the byte number and differing bytes of every difference:
    cmp -l file1 file2

© tl;dr; authors and contributors