Multiple choice technology programming languages

what does cmp do?

  1. Copies file1 to file2

  2. Compares file1 and file2 and update file1 with file2 whereever differs

  3. Compares file1 and file2 and update file2 with file1 whereever differs

  4. None

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The cmp command compares two files byte-by-byte and reports the first location where they differ (with byte and line numbers). It performs read-only comparison and modifies neither file.