Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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


Ïà¹ØÎĵµ£º

linux ÈçºÎ½øÈëͼÐνçÃæ

1.×ÔÆô¶¯£º
ÔÚ/etc/inittabÎļþÖÐÉèÖãº
#   Default   runlevel.   (Do   not   set   to   0   or   6)
id:5:initdefault:
2.×Ö·ûÖÕ¶ËģʽÏÂÆô¶¯x-windows:
startx ......

linux Æô¶¯¼¶±ð

ÒÔÏÂÊÇÅäÖÃÒýµ¼½øÈëͼÐÎģʽµÄ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 ......

¹ØÓÚ linux vfs

1. ÕªÒª
±¾ÎIJûÊö
Linux ÖеÄÎļþϵͳ²¿·Ö£¬Ô´´úÂëÀ´×Ô»ùÓÚ IA32 µÄ 2.4.20 Äںˡ£×ÜÌåÉÏ˵ Linux
ϵÄÎļþϵͳÖ÷Òª¿É·ÖΪÈý´ó¿é£ºÒ»ÊÇÉϲãµÄÎļþϵͳµÄϵͳµ÷Ó㬶þÊÇÐéÄâÎļþϵͳ VFS(Virtual Filesystem
Switch)£¬ÈýÊǹÒÔØµ½ VFS Öеĸ÷ʵ¼ÊÎļþϵͳ£¬ÀýÈç ext2£¬jffs µÈ¡£±¾ÎIJàÖØÓÚͨ¹ý¾ßÌåµÄ´úÂë·ÖÎöÀ´½âÊÍ Linux ......

linuxÏÂÐÔÄÜ·ÖÎö·½·¨ÊµÀý

ijһÌì,Ò»¸ö¿Í»§´òµç»°À´ÐèÒª¼¼Êõ°ïÖú,²¢±§Ô¹Æ½³£15Ãë¾Í¿ÉÒÔ´ò¿ªµÄÍøÒ³ÏÖÔÚÐèÒª20·ÖÖӲſÉÒÔ´ò¿ª.
¾ßÌåϵͳÅäÖÃÈçÏÂ:
RedHat Enterprise Linux 3 update 7
Dell 1850 Dual Core Xenon Processors, 2 GB RAM, 75GB 15K Drives
Custom LAMP software stack(Òë×¢:Llinux+apache+mysql+php »·¾³)
ÐÔÄÜ·ÖÎöÖ®²½Öè
1. Ê×ÏÈÊ ......

Linux curlʹÓüòµ¥½éÉÜ

CurlÊÇLinuxÏÂÒ»¸öºÜÇ¿´óµÄhttpÃüÁîÐй¤¾ß£¬Æä¹¦ÄÜÊ®·ÖÇ¿´ó¡£
1) ¶ÁÈ¡ÍøÒ³
$ curl http://www.linuxidc.com
2) ±£´æÍøÒ³
$ curl http://www.linuxidc.com > page.html
$ curl -o page.html http://www.linuxidc.com
3) ʹÓõÄproxy·þÎñÆ÷¼°Æä¶Ë¿Ú£º -x
$ curl -x 123.45.67.89:1080 -o page.html http://www.linu ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ