Patch Some Code – Linux Tip

As you use a Linux computer you will run into a time or two where you will need to build a program from it’s source code. Sometimes this code will need to be patched to add some functionality you want, to fix a bug, or even to add in your personal touches. Linux comes with a simple utility called patch that can help you apply patches to some code. To apply a patch from the root directory of a project, you can run

patch -p0 < patchfile

Also if you want to only check how the patch will work you can add the --dry-run option.

Eric Davis

About Eric Davis

I founded Little Stream Software where I help new entrepreneurs build a successful software business. I also created an ebook, Redmine Tips, where I show you how to become more productive using Redmine. I am also the author of Refactoring Redmine, where I go about refactoring Rails using Redmine as an example. Follow me on Twitter and Google Plus.

,

No comments yet.

Leave a Reply