How to Compare two files in Linux?

How to Compare two files in Linux?

Hello Everyone, in this post we will discuss how to compare two files in linux.

Although most of you would be aware of diff command, but there’s one more way to compare two files, it can be done through colordiff command, colordiff displays the output in a colorful manner.

You have to just install a package named as colordiff







Here in below example i have two files named as file1 & file2. These files have common common information as shown below







Now we will use colordiff command to compare these files




 This command is quite helpful when you have to compare files having thousand of lines.

Leave a Reply

Time limit is exhausted. Please reload the CAPTCHA.