Category: BBedit

How to make a diff file on Mac

I had occasion to make a patch file the other day, and since I do this so rarely, it took some time to look up how to do it. So here, in a nutshell is how to use diff on a Mac.

Open terminal.
At the prompt, type
diff -up newfile oldfile

But really the easiest way to get the paths right is to type:

diff -up

…then drag first the new file, then the old file from the desktop onto the terminal window right at the end of the line after -up . It will fill in the paths for you.

Continue reading