Diff vs. vimdiff command Linux detailed

Source: Internet
Author: User
Tags diff

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.