Tuesday, March 15, 2011

Create a patch file

Info here is from:

Another example file:

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