what is the difference between commmands cmp and diff?

Answer Posted / deepa rajendran

The cmp command compares two files, and (without options)
reports the location of the first
difference between them. It can deal with both binary and
ASCII file comparisons. It does a
byte-by-byte comparison.

But in diff compares two files, directories, etc, and
reports all differences between the two. It
deals only with ASCII files. It’s output format is designed
to report the changes necessary to convert
the first file into the second.

Is This Answer Correct ?    15 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a command that will display files in the current directory, in a colored, long format.

689


Which command should you use to find the remaining disk space in unix server?

714


How do I run a whois command?

606


Why is grep called grep?

783


What are awk commands?

586






Differentiate cat command from more command.

582


Explain ‘library functions’ with respect to unix commands?

606


What is awk used for?

624


What is the use of tee command?

573


What is the command to find maximum memory taking process on the server?

674


What is the command to view process running?

578


What is the behavioural difference between cmp and diff commands?

682


What is the search command in unix?

608


What do chgrp command do?

595


Is grep faster than awk?

564