Multiple choice

To compare content of two files in UNIX, we use

  1. compare

  2. test

  3. cmp

  4. none of these

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

The cmp command in UNIX performs a byte-by-byte comparison of two files and reports the first differing byte and line number. Unlike 'diff' which shows line-by-line differences, cmp gives a binary-style comparison. The 'compare' command doesn't exist in standard UNIX, and 'test' is for conditional expressions.