Info here is from:
http://linux.byexamples.com/archives/163/how-to-create-patch-file-using-patch-and-diff/
Another example file:
http://kailaspatil.blogspot.com/2010/08/how-to-create-patch-on-liunx.html
Create a patch file Tb01 and Tb02 are the two directories
diff -crB Tb01 Tb02 > Tb02.patch
to dry run the patch:
patch --dry-run -p1 -i Tb02.patch
apply the patch, creating Tb02 from Tb01:
patch -p1 -i Tb02.patchpatch -p1 -i Tb02.patch
Revert patches
example of applying a patch:
* gunzip patch-2.6.13-sometag.gz or bzip2 -d patch-2.6.13-sometag.bz2.
* file patch-2.6.13-sometag
* cd /path/to/kernel
* patch -p1 < /path/to/patch-2.6.13-sometag
Revert Patch
* change to directory with /path/to/kernel
* patch -Rp1 < patch-2.6.13-sometag
No comments:
Post a Comment