echothrust/howtos

A list of OpenBSD (mostly) material

View on GitHub

Diff Tips and Tricks

##How to create patches using diff

The original patch has the //new// changes

To create a patch for a single file, use the form: diff -u original.c new.c > original.patch

To create a patch for an entire source tree, make a copy of the tree: cp -R original new

Make any changes required in the directory new/. Then create a patch with the following command: diff -rupN original/ new/ > original.patch