diff和patch的使用
1) diff/patch這對(duì)工具在數(shù)學(xué)上來(lái)說(shuō),diff是對(duì)2個(gè)集合求差,patch是求和
diff A B > C 生成A和B的diff文件C
patch A C 給A打上diff文件得到B
patch -R B C B還原為A
2) 內(nèi)核補(bǔ)丁
生成
diff -uNr linux-2.6.xxx linux-2.6.xxx.1 > diff.patch
升級(jí)
cp diff.patch linux-2.6.xxx/.
cd linux-2.6.xxx
patch -p1 diff.patch
可以參考$(linux_src)/Documentation/applying_patches.txt
linux操作系統(tǒng)文章專題:linux操作系統(tǒng)詳解(linux不再難懂)
評(píng)論