Very often you will have different versions of the same file, and you need a way to find the exact difference between them. This section focuses on that activity. In particular, the diff and patch commands are very important to programmers who often distribute changes to an existing program in the form of a diff (in other words, a file containing the differences between an existing version and a newer version). The existing version can then be brought up to the level of the newer version using the patch command. This applies the changes that it finds in the diff file to the existing version, bringing it up to date. These ideas also underlie all version control systems.
Was this article helpful?