Patch Single file:
make a patch:
cd program_folder # go into the target folder
diff -Nu old_file new_file > patch_file
# the patch_file is the patch, it can use to patch file for another user
patch a file:
cd program_folder # go into the target folder
patch -p 1 < patch_file
# if you want to UnPatch the file
patch -R -p 1 < patch_file
Patch a Directory:
make a patch:
diff -rNu old_folder new_folder > patch_file
# no need to exec the command inside the program folder
patch the folder:
patch -p 0 < patch_file
# if you want to UnPatch, also use -R
patch -R -p 0 <>
2008年8月7日 星期四
How to use patch
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言