![how to use textedit in terminal how to use textedit in terminal](http://3.bp.blogspot.com/-ByA3As-qzHQ/UgZu3G6VOxI/AAAAAAAAACY/nFZX25b9daw/s1600/Screenshot+from+2013-08-10+22:25:35.png)
Each difference is listed in turn in a single column, and each difference is labeled. How do we dissect that output? Once you know what to look for it’s not that bad. Type diff, a space, the name of the first file, a space, the name of the second file, and then press Enter. We can compare the files with this command.
![how to use textedit in terminal how to use textedit in terminal](https://i.stack.imgur.com/uy0LI.png)
Both files contain the phonetic alphabet but the second file, alpha2, has had some further editing so that the two files are not identical. The order of the files on the command line determines which file diff considers to be the ‘first file’ and which it considers to be the “second file.” In the example below alpha1 is the first file, and alpha2 is the second file. Let’s dive right in and analyze two files. In this tutorial, we’re going to look at the most useful human-friendly ways to use diff.
HOW TO USE TEXTEDIT IN TERMINAL PATCH
The diff command was designed to find differences between source code files and to produce an output that could be read and acted upon by other programs, such as the patch command.
![how to use textedit in terminal how to use textedit in terminal](https://i0.wp.com/best-mac-tips.com/wp-content/uploads/2012/01/terminal.png)
If you keep that in mind you’ll find it easier to understand the output from diff. The diff command compares two files and produces a list of the differences between the two. To be more accurate, it produces a list of the changes that would need to be made to the first file, to make it match the second file.