CMP(1plan9)
π NAME π
cmp β compare two files. That's the whole job, bestie, and she does it flawlessly. π
πΈ SYNOPSIS πΈ
cmp [ -lsL ] file1 file2 [ offset1 [ offset2 ] ]
π¦ DESCRIPTION π¦
Okay so literally, the two files get compared. If the contents differ, you get a diagnostic. If they don't differ? No output at all. Silence. Nothing. She's not gonna congratulate you, she's just gonna sit there being correct. π€«
The options are:
-lβ print the byte number (decimal) and the differing bytes (hexadecimal) for each difference. Every single mismatch gets receipts, in hex, no cap. π-sβ print nothing for differing files, but set the exit status. Quiet girl mode: she won't say a word, she'll just tell you through the exit status. π€-Lβ print the line number of the first differing byte. One number, one line, straight to the point. π
If offsets are given, comparison starts at the designated byte position of the corresponding file. And here's how you tell her which base you're speaking, pay attention this part matters:
- offsets that begin with
0xβ hexadecimal - offsets that begin with
0β octal - offsets that begin with anything else β decimal
π SOURCE π
/src/cmd/cmp.c
π SEE ALSO π
diff(1) β her sibling, also iconic, different energy. π
π¨ DIAGNOSTICS π¨
- If a file is inaccessible or missing, the exit status is
- If the files are the same, the exit status is empty (true).
- If they are the same except that one is longer than the other, the exit status is
- Otherwise
cmpreports the position of the first disagreeing byte and the exit status is
ngl bestie, the exit status numbers are straight up missing from this copy of the page β it says "the exit status is" and then justβ¦ stops. π Not me inventing numbers to fill the gap, that is NOT the vibe. If you need the actual values, go read the source at /src/cmd/cmp.c, she'll tell you herself. π«Ά
And that's the page, fr fr. This one's CMP(1plan9) β yep, that's the Plan 9 manual, section 1, and the footer doesn't give us a date so I'm gonna call it timeless β¨. Same name top and bottom, CMP(1plan9), because consistency is main character energy. Bye babes, go compare something. ππ¦π
π¦ where this page comes from
- debian bookworm: 9base 1:6-13 Β· Lucent
- debian trixie: 9base 1:6-14 Β· Lucent
- ubuntu jammy: 9base 1:6-11 Β· Lucent
- ubuntu noble: 9base 1:6-14 Β· Lucent
- ubuntu questing: 9base 1:6-15
- ubuntu resolute: 9base 1:6-15build1 Β· Lucent
- ubuntu stonking: 9base 1:6-15build1 Β· Lucent
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms