zoukankan      html  css  js  c++  java
  • 打补丁说明

    生成补丁文件:diff (常用选项) -Nuar “版本1” “版本2” >“补丁文件”
    修复打补丁:patch -p(NUM) < 补丁文件
    例如:
    patch –R –p0 < to-file.patch #还原操作
    -p:从补丁文件中找到的每个文件名中去掉包含num前导斜杠的最小前缀.(对比源文件路径)
    参考链接:https://blog.csdn.net/zhongnanjun_3/article/details/7593904
    ########################################################################
    进入到要打补丁的文件位置:
    [root@ecs-12a3dd demo]# tree
    .
    ├── s1
    │   ├── find
    │   └── test.sh
    ├── s2
    │   ├── find
    │   ├── test.sh
    │   └── tmp.txt
    └── source.patch

    2 directories, 6 files
    ##########################################
    [root@ecs-12a3dd demo]# diff -ur s1/ s2/
    Binary files s1/find and s2/find differ
    diff -u s1/test.sh s2/test.sh
    --- s1/test.sh 2019-04-17 16:45:46.297000000 +0800
    +++ s2/test.sh 2019-04-17 16:46:58.870000000 +0800
    @@ -1 +1 @@
    -hello world
    +hello the world
    Only in s2/: tmp.txt
    ###############################################

    假设是一种超能力
  • 相关阅读:
    HDU 5521 Meeting
    HDU 5170 GTY's math problem
    HDU 5531 Rebuild
    HDU 5534 Partial Tree
    HDU 4101 Ali and Baba
    HDU 5522 Numbers
    HDU 5523 Game
    ZUFE OJ 2301 GW I (3)
    POJ 2398 Toy Storage
    POJ 2318 TOYS
  • 原文地址:https://www.cnblogs.com/Haihong72H/p/14392813.html
Copyright © 2011-2022 走看看