Patching

Better reference: http://www.thegeekstuff.com/2014/12/patch-command-examples/

yum install patch

To create patch:

diff -crB OriginalFolder ModifiedFolder > folder.patch

-c: context
-r: recursive (multiple level dir)
-B: ignore blank lines

To apply patch:

(dry run first, at target folder – to check for any error)

patch --dry-run -p1 -i folder.patch

If dry run success, do real patching:

patch -p1 -i folder.patch
munky-patch
Monkey patch
Share this...
Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInPin on Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *