There are two of these commands that are sometimes encountered in the daily work of Linux:
Diff and Vimdiff, both commands are used to compare file differences.
①diff
Let's go straight to the example:
Below I create a file, then the CP and then modify, and then do the comparison:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/8B/7A/wKioL1hPlbqCKUTjAABBmXxBAIA484.png "title=" Qq20161213143056.png "alt=" Wkiol1hplbqckutjaabbmxxbaia484.png "/>
②vimdiff
This command, like diff, can be said to be the enhanced version of diff, highlighting the differences between the two files:
Also take the above example to explain:
Terminal input: Vimdiff test.bak test
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/8B/7E/wKiom1hPlkfT0EO9AAA1rY6Ypys226.png "title=" Qq20161213143316.png "alt=" Wkiom1hplkft0eo9aaa1ry6ypys226.png "/>
This article is from the "Brother Hong Linux World" blog, so be sure to keep this source http://zhengkangkang.blog.51cto.com/12015643/1882252
Diff vs. vimdiff command Linux detailed