Linux patchµÄÓ÷¨
Linux patchµÄÓ÷¨
http://hi.baidu.com/issaria/blog/item/b04527ec816967d72f2e2184.html
2008-08-14 14:50
Ò²ÐíÖ»ÊÇÎÒÒ»¸öÈ˱Ƚϱ¿£¬Ã¿´ÎÅöµ½bug£¬ËäÈ»ÓÐÈ˸ø³ö²¹¶¡£¨patch£©£¬µ«ÊÇÈ´²»ÖªµÀÔõôʹÓá£Manual Page ( man patch )Ò²Ö»¸ø³ö patch -p(num) <patchfileÕâÑùµÄÓ÷¨£¬¾ßÌåÒ²²»ÖªµÀÔõÑùÈ·¶¨num£¬Èç¹ûÄãÒ²ÓÐÕâÑùµÄÒÉ»ó£¬Çë¼ÌÐøÔĶÁ£¬ÏÂÃæµÄÄÚÈÝÀ´×ÔÕâÀï
½¨Á¢patchÎļþ:
diff -Naur olddir newdir > new-patch
- or -
diff -Naur oldfile newfile >new-patch
-p0 »¹ÊÇ-p1? patch ÃüÁîµÄĿ¼²ã´Î£º
-pÑ¡Ïî¿ÉÒÔÑ¡ÔñÐԵؽضÏpatchfileµÄĿ¼²ã´Î¡£Àý£ºÈç¹ûÄãµÄpatchfileµÄÍ·ÏóÏÂÃæÕâÑù£º
--- old/modules/pcitable Mon Sep 27 11:03:56 1999
+++ new/modules/pcitable Tue Dec 19 20:05:41 2000
ʹÓà -p0 ½«´ÓÄãµÄµ±Ç°Â·¾¶ÏÂÑ°ÕÒÒ»¸ö“new"µÄ×ÓÎļþ¼Ð£¬È»ºóÔÚ"new"ÏÂÃæÑ°ÕÒ“modules”£¬È»ºóÔÚÆäÏÂÃæÑ°ÕÒ"pcitable"¡£
ʹÓà -p1 ½«½Ø¶ÏµÚÒ»²ãĿ¼£¬Ò²¾ÍÊÇ˵patch½«Ö±½ÓÔÚµ±Ç°Â·¾¶ÏÂÑ°ÕÒ"modules"£¬È»ºóÊÇ"pcitable"
ÒÀ´ÎÀàÍÆ¡£
ʵ¼ÊÉϵÄÈ·ºÜ¼òµ¥¡£
patch -p1 < [patchfile]
¡¡¡¡patch -R < [patchfile] (used to undo a patch)
Ïà¹ØÎĵµ£º
×¼±¸¹¤×÷:
¡¡¡¡Óõ½µÄperl À©Õ¹×é¼þ(modules)ÔÚÉÏƪÌù³ö.( win32::odbc Ä£¿é
)ÏÂÔØ×é¼þºó°´ÕÕReadmeÎļþ°²×°µ¹ÏìӦĿ¼.ÅäÖúÃÏàÓ¦µÄodbcÊý¾ÝÔ´.
¡¡¡¡
¡¡¡¡³ÌÐòʵÏÖ:
¡¡¡¡Ê¹ÓÃ
¡¡¡¡use
Win32::ODBC;
¡¡¡¡
¡¡¡¡Óï¾ä°üº¬Ó¦Ê¹ÓõÄÄ£¿éÊÇwin32::odbc,д³öÊý¾Ý¿â
Á¬½Ó×Ö·û´®
¡¡¡¡
¡¡¡¡$DSN = "DSN =
My DSN ......
µÚÒ»´ÎÔÚLinuxϱà³Ì¡£ºÇºÇ
ÔÚÍøÉÏËÑË÷ÁËÒ»ÏÂÔõôÑùÔÚLinuxϱà³Ì¡£ËµÊÇÓÃGeditдºÃ´úÂ룬Ȼºó±£´æ.c¸ñʽÎļþ¡£È»ºóµ½Öն˱àÒë¡£
´ò¿ªGedit.ÀϹæ¾Ø£¬ÏÈÀ´¸öHello.c
#include <stdio.h>
main()
{
printf("Hello~!Vimo~~\n\n");
}
±£´æ¡£È»ºó´ò¿ªÖնˡ£
±àÒëÊÇʲôÃüÁû°ì·¨£¬ÎÊÏÂͬѧ¡£°¢Áé¸æËßÎÒ£º ......
1.ϵͳºÍƽ̨ÊìϤ
ÔÚÒ»¸öеÄƽ̨ÉÏ¿ª·¢»òÕßÒÆÖ²Ò»¿îÈí¼þµÄʱºò£¬Ê×ÏÈÓ¦¸Ã³ä·Öƽ̨»òÕß
²Ù×÷ϵͳµÄ¸÷ÖÖÊôÐÔ£¬ÕâЩÊôÐÔ°üÀ¨µ«²»½öÏÞÓÚ£º
1)ϵͳµÄÈÎÎñµ÷¶È£¬ÈÎÎñ¼äµÄͨÐÅ»úÖÆ
ÈÎÎñµ÷¶È°üÀ¨ÊÇ·ñÊǶàÈÎÎñʵʱ²Ù×÷ϵͳ£¬ÈÎÎñÒÔºÎÖÖ·½Ê½´æÔڵģ¬ÈçºÎÌí¼ÓºÍ¹ÜÀíÈÎÎñ£¿ÈÎÎñ¼äµÄÓÅÏȼ¶ÈçºÎÉèÖã¿ÈÎÎñ¼äµÄÓÅÏȼ¶ÉèÖã¿ÈÎÎñ¶ÑÕ»£¿ ......
ÎÒÃÇͨ³£°ÑһЩ¹«Óú¯ÊýÖÆ×÷³Éº¯Êý¿â£¬¹©ÆäËü³ÌÐòʹÓá£
º¯Êý¿â·ÖΪ¾²Ì¬¿âºÍ¶¯Ì¬¿âÁ½ÖÖ¡£
¾²Ì¬¿âÔÚ³ÌÐò±àÒëʱ»á±»Á¬½Óµ½Ä¿±ê´úÂëÖУ¬³ÌÐòÔËÐÐʱ½«²»ÔÙÐèÒª¸Ã¾²Ì¬¿â¡£
¶¯Ì¬¿âÔÚ³ÌÐò±àÒëʱ²¢²»»á±»Á¬½Óµ½Ä¿±ê´úÂëÖУ¬¶øÊÇÔÚ³ÌÐòÔËÐÐÊDzű»ÔØÈ룬Òò´ËÔÚ³ÌÐòÔËÐÐʱ»¹ÐèÒª¶¯Ì¬¿â´æÔÚ¡£
±¾ÎÄÖ÷Ҫͨ¹ý¾ÙÀýÀ´ËµÃ÷ÔÚLinuxÖÐÈçº ......