linux³ÌÐò´íÎóÐ޸ģ¿
main()
{
buff[]="ifconfig eth11 ";
buff1[]="192.168.2.15";
strcat(buff,buff1);
system(buff);
}
ΪʲôÔËÐÐÍ껹¸Ä²»ÁËIP
Õâ³ÌÐòÄÜÔËÐÐÂð£¿buff¶¼Ã»ÓÐÉùÃ÷
ÊÇ°¡£¡ÄãÕâ³ÌÐòÄܱàÒë¹ýÂð£¿
ºÇºÇ
ÄãÄÜ˵ÊÇʲô´íÎóÂð£¿ÎÒÖ»ÄܲÂÁË¡£
Äã¶ÔbuffºÍBuff1ûÓж¨Ò壬»òÕßÄ㶨ÒåµÄʱºòbuffûÓÐ×ã¹»µÄ¿Õ¼ä´æ·Åbuff1µÄÄÚÈÝ¡£
»¹ÓпÉÄÜÊÇÄãµÄµçÄÔ¸ù±¾¾ÍûÓÐeth11É豸¡£
ÕâÊÇÔÚÎÒµçÄÔÉÏÄÜÔËÐеĴúÂ룺
include <stdio.h>
#include <string.h>
int main()
{
char buff[27]="ifconfig eth0";
char buff1[]=" 192.168.2.17";
strcat(buff,buff1);
system(buff);
}
×¢Ò⣬ÕâÑùÐÞ¸ÄipÖØÆôµçÄÔºó»ÚʧЧ£¬ÒòΪÄãÕâÑù¸ÄµÄÅäÖÃÖ»·ÅÔÚÄÚ´æÀÄãÖ»ÓÐÐÞ¸ÄÍø¿¨µÄÅäÖÃÎļþ²ÅÄÜÓÀ¾ÃÓÐЧ¡£
Ïà¹ØÎÊ´ð£º
Ò»Ö±ÓÃsvnÀ´×ö×ÊÔ´µÄ¹ÜÀí£¬
ÏÖÔÚ·¢ÏÖwindowsÏÂÈ¡svn Òª10¸öСʱ×óÓÒ£¨×ÊÔ´´óÔ¼ÓÐ20G,È«ÊÇСÎļþ£©
linuxÏÂÈ¡½öÓÃ40·ÖÖÓ£¬
ÇëÎÊlinuxµÄÎļþϵͳÔÚÄĶù±ÈwindowsÎļþϵͳǿÁ¦?
svn ¿É¹»ÂýµÄ¡£
ÔÚ ......
ÎÒҪд¸ö·þÎñ¶Ë¡£ ÒªÇóͬʱ֧³Öwindows ºÍ linux Á½¸ö ϵͳ¡£ Ò²¾ÍÊÇҪдһ¸ö dllºÍÒ»¸öso Îļþ¡£ÓÉÓÚÎÒÒ»Ö±¶¼ÊÇÔÚwindsÏÂд³ÌÐò¡£linuxµÄ»¹²»»á¡£ Ïò´ó¼Ò×Éѯ ͬʱ Ö§³Ö dllºÍso Ó¦¸ÃÔõôд¡£
Óô¿c/c ......
linux Ͻø³Ì´´½¨¡£
ʹÓÃvfork() º¯Êý´´½¨ÁË×Ó½ø³Ìºó£¬×Ó½ø³ÌÏÈÐÐÖ´ÐУ¬ÔÚ×Ó½ø³Ìµ÷ÓÃexit»òexec֮ǰ¸¸½ø³Ì´¦ÓÚʲô״̬£¿£¿
²»ÖªµÀ£»Ê×ÏÈδ±ØÊÇ×Ó½ø³ÌÏÈÖ´ÐУ»µÚ2¸¸½ø³ÌÒ²´¦ÓÚÖ´ÐÐ״̬£»ÖÁÓÚ¸¸½ø³Ìµ½µ××öʲô£»¿´´ ......
while(1)
{
time_t now;
time(&now);
struct tm* pt=localtime(&now);
cout < < "µ±Ç°Ê±¼ä" < < pt->t ......
Á½¸öÎļþ1.PC£¬1.inc
1.PCÓвÙ×÷oracleÊý¾Ý¿âµÄ ,1.incÒ²ÓвÙ×÷oracleÊý¾Ý¿â
ÔÚÆäËûÊý¾ÝÖÐÈçinformix ÖÐ$include 1.inc¾Í¿ÉÒÔʹÓÃÁË
ÔÚORACLEÊý¾Ý¿âÖØ $include 1.inc²»¿ÉÓà EXEC SQL include 1.incÒ²²»¿É ......