Chinaunix首页 | 论坛 | 博客
  • 博客访问: 605945
  • 博文数量: 150
  • 博客积分: 1132
  • 博客等级: 少尉
  • 技术积分: 2067
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-11 16:46
文章分类

全部博文(150)

文章存档

2015年(15)

2014年(75)

2013年(4)

2012年(56)

分类: LINUX

2014-11-20 13:35:03

一、制作补丁:
diff -urP from-file to-file

If  from-file  is  a directory and to-file is not, diff compares the file in from-file whose file name is that of to-file, and vice versa.
If both from-file and to-file are directories, diff compares corresponding files in both directories,  in  alphabetical  order;  this  comparison is not recursive unless the -r or --recursive option is given.
补丁的制作是有“方向性”的。 这样制作的是用于从 from-file 生成 to-file 的补丁。

-u
Use the unified output format.
-r
When comparing directories, recursively compare any subdirectories found.
-P
When comparing directories, if a file appears only in the second directory of the two, treat it as present but empty in the other.

二、打补丁:
patch -s -p1 -b --suffix .bak --fuzz=0 [-R] < patch

-s or --silent or --quiet
Work silently, unless an error occurs.
-pnum  or  --strip=num
Strip  the  smallest  prefix  containing  num  leading slashes from each file name found in the patch file. This controls how file names found  in
the  patch file are treated, in case you keep your files in a different directory than the person who sent out the patch.
Whatever you end up with is looked for  either  in  the current directory, or the directory specified by the -d option.
-b or --backup
Make backup files.
-z suffix  or  --suffix=suffix
Use  suffix  as  the  simple  backup  suffix.
-F num  or  --fuzz=num
Set the maximum fuzz factor.

ntpdate stdtime.hk
阅读(654) | 评论(0) | 转发(0) |
0

上一篇:socket 编程

下一篇:tcpdump

给主人留下些什么吧!~~