CMP(1)
๐ CMP(1) โ the compare-two-files byte-by-byte manual ๐
okay bestie, so this is cmp, a User Commands girlie from the diffutils 3.12 era (April 2025 energy โจ). She's not flashy, she's not loud, she just looks at two files byte by byte and tells you if they match. it's giving forensic scientist. it's giving meticulous. we love her for it ๐ซถ
โจ NAME โจ
cmp โ compare two files byte by byte ๐ฆ
๐ธ SYNOPSIS ๐ธ
cmp [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]
๐ DESCRIPTION ๐
Compare two files byte by byte. that's it, that's the whole job, and she does it flawlessly.
The optional SKIP1 and SKIP2 specify the number of bytes to skip at the beginning of each file (zero by default). so like, if you wanna pretend the first chunk of a file doesn't exist, she's got you ๐
Mandatory arguments to long options are mandatory for short options too. (yes bestie that's a real sentence, it's the classic GNU rule: if a long option needs a value, the short version needs it too, no exceptions, periodt.)
๐ OPTIONS ๐
-b,--print-bytesโ print differing bytes. show me the receipts, literally ๐-i,--ignore-initial=SKIPโ skip firstSKIPbytes of both inputs-i,--ignore-initial=SKIP1:SKIP2โ skip firstSKIP1bytes ofFILE1and firstSKIP2bytes ofFILE2. yes the same flag twice, she contains multitudes ๐ง-l,--verboseโ output byte numbers and differing byte values. the full tea โ-n,--bytes=LIMITโ compare at mostLIMITbytes. girl has a stopping point and honestly? boundaries ๐-s,--quiet,--silentโ suppress all normal output. silent but deadly, no cap ๐คซ--helpโ display this help and exit-v,--versionโ output version information and exit
๐ฅ THE SUFFIX LORE ๐ฅ
SKIP values may be followed by the following multiplicative suffixes: kB 1000, K 1024, MB 1,000,000, M 1,048,576, GB 1,000,000,000, G 1,073,741,824, and so on for T, P, E, Z, Y.
so lowercase k = powers of 1000, uppercase = powers of 1024, and the pattern just keeps going up through T, P, E, Z, Y like a lil staircase to the heavens ๐โจ
ngl this is the part where people get got:KandkBare NOT the same number. read twice, type once bestie ๐ญ
๐ STDIN + EXIT STATUS ๐
If a FILE is '-' or missing, read standard input. (the dash is the classic "yeah just pipe it in" move ๐ซถ)
Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.
0โ twin flames ๐ identical1โ they're different, it's giving exes ๐2โ something went wrong, trouble in paradise ๐ญ
๐ AUTHOR ๐
Written by Torbjorn Granlund and David MacKenzie. kings, honestly, we stan ๐
๐ REPORTING BUGS ๐
Report bugs to: bug-diffutils@gnu.org
GNU diffutils home page: <https://www.gnu.org/software/diffutils/>
General help using GNU software: <https://www.gnu.org/gethelp/>
if you find a bug, tell them! they wanna know! constructive feedback is self-care fr fr ๐ธ
โญ COPYRIGHT โญ
Copyright ยฉ 2025 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
like, literally no warranty, bestie. she's free and she's yours to remix, but if it breaks, that's on you ๐
๐ SEE ALSO ๐
The full documentation for cmp is maintained as a Texinfo manual. If the info and cmp programs are properly installed at your site, the command
info cmp
should give you access to the complete manual. go read it, it's the director's cut ๐ ๐
okay that's the whole page!! you made it to the end, iconic behavior ๐
this has been diffutils 3.12, dated April 2025 โ mwah, sending you and your bytes nothing but love ๐โจ๐
๐ฆ where this page comes from
- alpine 3.22: diffutils-doc 3.12-r0 ยท GPL-3.0-or-later
- alpine 3.23: diffutils-doc 3.12-r0 ยท GPL-3.0-or-later
- alpine 3.24: diffutils-doc 3.12-r0 ยท GPL-3.0-or-later
- arch rolling: diffutils 3.12-2 ยท GPL-3.0-or-later
- fedora 43: diffutils 3.12-3.fc43 ยท GPL-3.0-or-later
- fedora 44: diffutils 3.12-5.fc44 ยท GPL-3.0-or-later
- nixos 26.05: diffutils 3.12
- nixos 26.05: diffutils-static 3.12
- nixpkgs unstable: diffutils 3.12
- opensuse-leap 16.0: diffutils 3.12-160000.2.2 ยท GFDL-1.2-only AND GPL-3.0-or-later
- opensuse-leap 16.0: diffutils 3.12-160000.2.2 ยท GFDL-1.2-only AND GPL-3.0-or-later
- opensuse-leap 16.0: diffutils 3.12-160000.2.2 ยท GFDL-1.2-only AND GPL-3.0-or-later
- opensuse-leap 16.0: diffutils 3.12-160000.2.2 ยท GFDL-1.2-only AND GPL-3.0-or-later
- ubuntu resolute: diffutils 1:3.12-1 ยท GPL-3.0-or-later
- ubuntu resolute: diffutils 1:3.12-1ubuntu0.1 ยท GPL-3.0-or-later
- ubuntu stonking: diffutils 1:3.12-1ubuntu2 ยท GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms