From the course: Cisco DevNet Associate (200-901) Cert Prep 5: Infrastructure and Automation

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Understand unified diff

Understand unified diff

- [Instructor] Oftentimes, we need to compare different file contents for their differences. This is where the diff utility could come in handy. Diff is a data comparison tool that computes and displays the differences between the contents of files. It tries to display differences line by line. Many times it is used to show the differences between versions of the same file. It is invoked by using the diff command, followed by the original file, then the new file. Diff output could be displayed in multiple formats, nowadays, the unified format is the most common. This is also known as the patch, because it could be applied with a unit program patch. The unified format is the most common format to be exchanged between software engineers. Let's see an example. Let's say we have an original infrastructure file in XML format. We can see that we have the topology node as the roots, some extension, as well as the first node of…

Contents