码迷,mamicode.com
首页 > 其他好文 > 详细

diff and patch

时间:2014-09-03 03:52:15      阅读:252      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   io   for   div   sp   log   on   

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

 

diff and patch

标签:style   blog   color   io   for   div   sp   log   on   

原文地址:http://www.cnblogs.com/miaoz/p/3952703.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!