Open In App

diff3 command in Linux with examples

diff3 command is used to compare the three files line by line. It internally uses the diff command to compare. When three files are compared then the following output may come which have their own meaning:

Syntax:



diff3 [OPTIONS]

Example: Let us consider three files as a.txt, b.txt and c.txt.



Now if diff3 command is used over these three files then following output will come:

Here, the very first line ‘====3’ tells that the file number 3 i.e. c.txt is different from the other two. This is visible in the output too.

Options:

Article Tags :