entire source directories. To create a patch for a single file, use the form: diff -u original.c new.c &gt; 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/ &gt; original.patch That's all you need to get started with diff and patch. For more information use: man diff man patch Translations This article has been translated and republished in the following languages: