what is the difference between cmp and diff commands

Answer Posted / srikanth

cmp - It will compare files byte by byte
Ex: cmp text text1
text text1 differ: byte 2, line 1

diff - It will compare files line by line
If there are any differences in the file. Then it will print
to stdout along with all lines

Is This Answer Correct ?    13 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I open the shell prompt?

571


What is bourne shell scripting?

533


What is the best scripting language?

562


Explain about debugging?

606


Devise a script that takes file name as arguement(which must present in the current directory)and locates from your home directory tree all thpath names of its links.Then mail the list to self.

1707






What is the conditional statement in shell scripting?

657


What is a shell in operating system?

588


Why should we use shell scripts?

590


What is path in shell script?

636


What does $0 mean in shell script?

554


When should shell programming/scripting not be used?

590


What is wc in shell script?

557


What is awk script?

543


What are types of shells?

547


How to check if a directory exists?

553