Ravi Sir's Cards › AWS
diff vs cmp
This comparison card contrasts diff and cmp. diff is described as line by line. cmp is described as byte by byte. The card pairs diff with config and code, and cmp with binary files.
Read card text
What this card says
Compare
diff
Line by line.
cmp
Byte by byte.
Key points
Shows what changed.
Says where it differs.
Example
diff -u a.conf b.conf
Use when
Config and code.
Binary files.