what is the difference between cmp and diff commands

Answers were Sorted based on User's Feedback



what is the difference between cmp and diff commands..

Answer / supreetha

cmp--> shows the first difference in the files

diff--> shows all the differences in the files

Is This Answer Correct ?    17 Yes 4 No

what is the difference between cmp and diff commands..

Answer / 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

More Shell Script Interview Questions

Is shell scripting a programming language?

0 Answers  


What are the two files of crontab command?

0 Answers  


How will you connect to a database server from linux?

0 Answers  


what is the difference between sh & bash shell?

1 Answers  


How do I read a .sh file?

0 Answers  






Where cron file kept?

2 Answers   Tech Mahindra,


What is the difference between a variable and value?

7 Answers   Sun Microsystems,


What is computer cli?

0 Answers  


What is the conditional statement in shell scripting?

0 Answers  


How do I open the shell in cmd?

0 Answers  


What does it mean to debug a script?

0 Answers  


how will you find the total disk space used by a specific user?

0 Answers  


Categories