cmp

Linux · Files · available in the simulator

What it does

Compare two files byte by byte.

Options and parameters

  • -l

    Output byte numbers and differing byte values.

  • -s

    Suppress all normal output (exit status only).

  • -b

    Print differing bytes.

Usage examples

  • cmp f1 f2
  • cmp -l f1 f2
  • cmp -s f1 f2
  • cmp a.bin b.bin
Practise cmp

Related commands