1.

Which option is used with cmp command to display a detailed list of mismatches?(a) -a(b) -b(c) -f(d) -lThe question was posed to me in an internship interview.This interesting question is from Comparing Files:comm, cmp and diff Command in section Handling Ordinary Files of Unix

Answer»

The correct answer is (d) -l

To explain: cmp command by default only displays the first mismatch that OCCURS in both files. For a detailed LIST of all the mismatches, we use the -l option. It prints byte POSITION and the byte VALUE for all differing bytes.



Discussion

No Comment Found

Related InterviewSolutions