源码补丁工具diff+patch

2018-08-04 00:51:33
Reading:367
diff:
     生成源码补丁的强大工具,能对单个文件进行生成补丁,也能对整个工程目录
      diff常用命令:
      -a   patch里包含二进制文件
      -r   和其他命令的-r参数差不多都是递归处理目录
      -N   patch里含有新文件
      -u   按照同意格式输出
   对单个文件:
       diff -u odl.c new.c
   对整个目录
       diff -uN odl new

patch:
   对源码进行打补丁和拆除补丁
patch -pn < name of patch file (打补丁)

patch  -pn -RE < name of patch file (拆除补丁的过程) 


About

When I was young
I'd listen to the radio
Waiting for my favorite songs
When they played I'd sing along
It made me smile
Those were such happy times
And not so long ago
How I wondered where they'd gone
But they're back again
Just like a long lost friend
All the songs I loved so well