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
Ïà¹ØÎĵµ£º
vmware tool°²×°²½Öè
1¡¢±£Ö¤Òª°²×°VMWare ToolsµÄÐéÄâ²Ù×÷ϵͳ¿ªÆô¡£
2¡¢°´Ï CTRL+ALT×éºÏ¼ü£¬½øÈëÖ÷²Ù×÷ϵͳ£¬µã»÷VMWARE״̬À¸[b][font=ËÎÌå]°²×°[/font][/b]Ìáʾ£¬»òÕßµã»÷ VMÑ¡ÔñInstall vmware tools….
3¡¢È·Èϰ²×°VMWARE TOOLS¡£ £¨VMWareToolsÊÇÔÚÐéÄâµÄ²Ù×÷ϵͳÖа²×°£¬²»ÊÇÔÚÎïÀí»úÉϰ ......
´ÓÍøÉÏÏÂÁËһЩѧϰ×ÊÁÏ£¬¶¼ÊÇÎı¾Îļþ£¬Óà gedit ²é¿´¶¼ÊÇÂÒÂ룬ÓÃvim¿ÉÒÔÕý³£ÏÔʾ£¬ÎÒÖªµÀÕâÊÇ geditûÓÐÌí¼ÓÏàÓ¦Ö§³ÖµÄÄÚÂ룬ÎÒÒ²²»Ïë¼ÓÁË£¬ÓÃvim»¹ÊǶàÒ»µã£¬µ«ÊÇÈç¹ûÒªcopy µ½ÊÖ»úÉÏ¿ÉÄÜÒ²»áÂÒÂ룬×îºÃ±£ÏÕµÄ×ö·¨ÊǰÑËüת³É±ê×¼µÄ±àÂë¸ñʽ utf-8.
Ê×ÏÈÎÒÃÇÈçºÎÖªµÀÎļþµÄ±àÂë¸ñÊ½ÄØ£¬ÔÚ vim Àï ÃüÁî :set fileencodin ......
ÒÔÏÂÊÇÅäÖÃÒýµ¼½øÈëͼÐÎģʽµÄ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 ......
»ùÓÚ½ø³ÌµÄÃüÁʽ²é¿´:
`ps -o pcpu,pmem,nlwp -p $PID`
#(pmem = % mem usage and nlwp is number of threads)
ÆäÖÐpcpu¶¨ÒåÊÇ:cpu utilization of the process in “##.#” format. It is the CPU time used divided by the time the process has been running (cputime/realtime ratio), expressed as a ......
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. Ê×ÏÈÊ ......