
The original file is listed first, then the modified file. We provide the names of the files so that diff knows which files to compare. The -u (unified) option tells diff to also list some of the un-modified text lines from before and after each of the changed sections. These lines are called context lines. They help the patch command locate precisely where a change must be made in the original file. We’ll compare the version in the working directory to the one in the latest directory. Its default action is to list the modified lines in the terminal window. The diff command finds the differences between two files. Finding the Differences Between Two Versions of a File To be safe, the working directory is a copy of the current version of the text files. The latest directory holds the most recent version of those source code files, some of which have been modified.


The working directory holds a set of source code files. One is called working, and the other one is called latest. In this scenario, we are in a directory called work which contains two other directories.
#How to use tes5edit to make a patch how to
RELATED: How to Compare Two Text Files in the Linux Terminal Our Example Scenario
#How to use tes5edit to make a patch Patch
The patch command is most often used by people working with software source code files, but it works equally well with any set of text files whatever their purpose, source code or not. We’ll walk you through it in this article. What do you do with the patch file to actually patch your files? Apart from almost being a tongue-twister, that’s also a good question. Why send dozens of files round when you can send one file, or post one file for easy download? Sometimes you don’t get sent the modified files.
