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

What are the zombie processes?

563


how to print the matrix form of 2-d, 3-d arrays in unix c shell scripts ?

3603


What is another name for a bash shell script that you might see?

1010


write a shell script to generate a alert ? like when ur birthday came then generate a alert ur birthday is today like that ?

3587


What is .sh file in mac?

553






Explore about environment variables?

590


Is cmd a shell?

591


What is $1 in shell scripting?

589


Set up a Sev 2 alert when the Primary WA service fails. A windows batch script needs to be created that will monitor the WA service on the Primary and when the service stops/fails a Sev 2 TT is generated for a particular team ?

1711


What is difference between shell and bash scripting?

541


What happens when you type ls?

558


Can shell script run on windows?

562


What are different types of shell?

488


Is it possible to substitute "ls" command in the place of "echo" command?

614


What is ms powershell?

580