您的位置:首页 > 其它

diff and patch

2014-09-03 03:44 232 查看
A patch captures the changes of two different files (oldfile and newfile). Given the oldfile and the patch, one can use the patch program to create the newfile. This is exactly what we want. When you have done all the modifications, you can perform a command like this:

diff -ruNp minix_src_clean/ proj0/ > patch


this will creat a new file called patch.

You can test whether your patch has worked by creating another copy of the source tree and running patch as so:

cp -r minix_src_clean test
cd test
patch -p1 < ../patch
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: