LinuxÏÂCÓïÑÔʵÏÖ×Ö·û´®×Ó´®Ìæ»»
ÓÉÓÚLINUX
CûÓжÔ×Ö·û´®×Ó´®Ìæ»»¹¦ÄÜ,ËùÒÔÎÒ×Ô¼ºÐ´ÁËÒ»¸östr_replaceº¯Êý,ʵÏÖÁË×Ö·û´®Ìæ»».
Çë´ó¼Ò²Î¿¼.
/*
* FUNCTION : str_replace
*
ABSTRACT : replace child string in a string.
*
PARAMETER :
*
char* str
the string that be replace
*
char* str_src source string
*
char* str_des destination string
*
RETURN :
*
0 OK
*
-1 FALSE
* CREATE : 2006-01-05
ZHANG.JINCUN
* NOTE
:
*/
int str_replace(char* str,char* str_src, char*
str_des){
char *ptr=NULL;
char buff[256];
char buff2[256];
int i = 0;
if(str !=
NULL){
strcpy(buff2, str);
}else{
printf("str_replace err!\n");
return -1;
}
memset(buff,
0x00, sizeof(buff));
while((ptr = strstr( buff2,
str_src)) !=0){
if(ptr-buff2 != 0) memcpy(&buff[i], buff2, ptr - buff2);
memcpy(&buff[i + ptr - buff2], str_des, strlen(str_des));
i += ptr - bu
Ïà¹ØÎĵµ£º
×ÜÀÀ
ÓÃiptables -ADC À´Ö¸¶¨Á´µÄ¹æ
Ôò
£¬-AÌí¼Ó -Dɾ³ý -C ÐÞ¸Ä
iptables - [RI] chain rule num rule-specification[option]
ÓÃiptables - RI ͨ¹ý¹æÔòµÄ˳ÐòÖ¸¶¨
iptables -D chain rule num[option]
ɾ³ýÖ¸¶¨¹æÔò
iptables -[LFZ] [chain][option]
ÓÃiptables -LFZ Á´Ãû [Ñ¡Ïî]
iptables -[NX] chain
ÓÃ -NX ......
ÓÉÓÚ Linux Á¼ºÃµÄÓû§È¨ÏÞ¹ÜÀíÌåϵ£¬²¡¶¾ÍùÍùÊÇ Linux ϵͳ¹ÜÀíÔ±×îºó²ÅÐèÒª¿¼ÂǵÄÎÊÌâ¡£ÒÔÍù£¬Linux ÉϵÄɱ¶¾Èí¼þÖ÷ÒªÊÇΪÆóÒµµÄÓʼþºÍÎļþ·þÎñÆ÷ËùÉè¼ÆµÄ¡£Èç½ñ£¬Ëæ×Å Linux ×ÀÃæÓû§ÊýÁ¿µÄÔö³¤£¬×ÀÃæÓû§ÔÚÊÜÒæÓÚ Linux ϵͳ¶Ô²¡¶¾½ÏÇ¿µÄÌìÈ»ÃâÒßÁ¦µÄͬʱ£¬Ò²ÐèҪɱ¶¾Èí¼þÇåÀí´ÓÍøÂç»òUÅÌ´øÀ´µÄWIndows²¡¶¾¡£¾¡¹ÜÄÇЩ ......
ÍøÉÏÒ»µÀ½ðɽµÄÃæÊÔÌ⣺
http://topic.csdn.net/u/20100524/14/0eff992a-2849-4db6-bdaa-d4a200e79b7c.html
Çë·Ö±ðÓÃC++µÄÃæÏò¶ÔÏóºÍ·ºÐÍ»úÖÆ£¬±àдʵÏÖTemplate MethodģʽµÄʾÀý´úÂ룬²¢±È½ÏÁ½ÖÖ·½Ê½¸÷×ÔµÄÓÅȱµã¡£
ÓÃÐ麯ÊýʵÏÖTemplate MethodµÄ·½Ê½¾Í²»¶à˵ÁË¡£Ó÷ºÐ͵ķ½Ê½ÊµÏÖ¶à̬ÔÚATLÀïÃæÓдóÁ¿µÄÓõ½£¡
·ºÐ͵ ......
3.2.1 Linux ÄÚ´æ°ó¶¨ÔÚ¾Ö²¿´æ´¢Æ÷µÄʵÏÖ×ÜÌå²½Öè
×ÜÌå²½Ö裺
l ²ÉÓ÷½°¸Èý£¬ÔÚÔÚÔÀ´·ÖÎöµÄ»ù´¡ÉÏ£¬ÒÔ¼°ÒÑÖªLinuxϵͳÄÚ´æµÄ³õʼ»¯µÄÇé¿ö£¬¶ÔÄں˴úÂë½øÐÐÐ޸ģ¬Ö÷Òª°üÀ¨È·¶¨ÐÂÇøµÄ·¶Î§£¬½¨Á¢ÐÂÇø£¬ÖØжԷÖÅäÄÚ´æµÄ·ÖÅä»úÖƽøÐÐÉèÖá£
l &n ......
ÒÔÏÂÊÇÅäÖÃÒýµ¼½øÈëͼÐÎģʽµÄetc/inittabÎļþµÄ²¿·ÖÄÚÈÝ£º
#Default runlevel.The runlevels used by RHS are:
# 0-halt(Do NOT set initdefault to this)
# 1 -Single user mode
# 2-Multiuser,without NFS(The same as 3,if you do not have networking)
# 3-Full multiuser mode
# 4-unu ......