Linux cmp and diff commands|Linux commands for devops |difference between cmp and diff CMP = command is used for comparing the byte by byte of text information of a file and outputs the first difference of the file. cat list1.txt green blue yellow white cat list2.txt green blue black white cmp list1.txt list2.txt output:- list1.txt list2.txt differ: byte 6, line 2 ------------------------------------------------------------------------------------------------------------------------------------- diff = it is used for comparting two text files and displays all the mis-matches in the files. In addition it displays special symbols helping us in understanding what we should do to make those two files identical. a = add c = change the text of the file d = delete line In addition to this it displays the mis-match lines with notation. = indicates the right side file = indicates suggestion should be applied to left side file 2,5c3 =in the left file from 2 - 5 lines should be replaced ...
Hey This is Sai Vinod Irala here you are able see complete information About Devops and Linux Concepts,Learn basic commands for Linux and Latest government jobs information like exam dates, syllabus, results, guidance,Software courses details etc.
Comments
Post a Comment