1.linuxä¸çifè¯å¥linuxä¸çif
linuxä¸çifè¯å¥linuxä¸çif
linuxä¸æä¹ç¨ifæ¯è¾ä¸¤ä¸ªæ件ä¹é´æéå¤çï¼#includestdio.h>#defineNintmain(){ char*p,国内溯源码buffer,str1,str,str2;FILE*fp;intn,i;if(fp=fopen(data1.txt,r)){ n=0;while(!feof(fp)){ fgets(buffer,,fp);sscanf(buffer,%s%s%s%s%s%s%s,str,str,str,str,str1,str,str);n++;if(n>=N)break;}fclose(fp);
}elseprintf(Cannotopendata1.txtn)
;if(fp=fopen(data2.txt,r)){ while(!feof(fp)){ fgets(buffer,,fp);sscanf(buffer,%s%s%s%s%s%s%s%s%s%s%s%s%s%s, str,str,str,str,str,str,str,str,str,str,str,str2,str,str);p=str2;while(*p)p++;p--;*p=0;for(i=0;in;i++)if(strcmp(str1,str2+1)==0)puts(buffer);}fclose(fp);
}elseprintf(Cannotopendata2.txtn);return0;}
linuxç½å¡é ç½®æ件ifcfg-eth0丢失ï¼æä¹åäºï¼
è¿ä¸ªæ²¡æ好åæ³ï¼åªè½æ ¹æ®ä½ çç»éªäºï¼å¦ææ¯ç³»ç»ç®¡çåçè¯ï¼å¤ç¨ä¸ä¸åçåè¡çå°±ç¥éäºï¼ä¸è¬æ¯debåè¡çæèªå·±çç¹å¾ï¼æ¯å¦ubuntuçæ¯/etc/network/interfacesæ件redhatåå ¶centosçæ¯/etc/system-config/network-scripts/ç®å½ä¸æè ...
é ç½®linuxç½ç»æ¶ï¼ç¨ifconfigåä¿®æ¹/etc/network/interfacesï¼è¿ä¸¤ç§æ¹æ³çä¸åç¹ï¼
æ¹/etc/network/interfaces,æéé¢çIPä¿®æ¹ï¼ä¿®æ¹åéè¦éå¯networkç¨åºæè½çæï¼ï¼rebootå ¶å®ç¸å½äºéå¯networkç¨åºï¼
èç¨ifconfigeth0IPè¿ä¸ªæ令ï¼ä½ å¯ä»¥è®¤ä¸ºä¿®æ¹äº/etc/network/interfacesï¼ç¶ååéå¯äºnetwork.è¿ä¸ªä¿®æ¹åæ¯ç«å³çæç
ps:éå¯networkæ令ï¼servicenetworkrestart
ä¸ç¥éä½ ç¨çæ¯ä»ä¹ç³»ç»çï¼red-hatï¼çº¢å¸½ï¼çIPé ç½®æ件åºè¯¥å¨/etc/sysconfig/network-script/ifcfg-eth0
linuxä¸ç¨ifconfigè¾åºçå 容æä¹å¤å¶ï¼
éè¦çä½ ç¨ä»ä¹ç»ç«¯è½¯ä»¶ç»å½ï¼ä½¿ç¨é¢çè¾é«ç软件æSecureCRT软件ï¼å¨è¿ä¸ªè½¯ä»¶éé¢ï¼åªè¦éä¸éè¦å¤å¶çæåï¼æCRTL+Cææå车é®ï¼å³å¯å¤å¶ã
CRT软件
linuxä¸ifä¸caseçåºå«ï¼
æµç¨æ§å¶æ¯ç¼ç¨è¯è¨åºç¡ä¸çåºç¡ï¼ifè¯å¥åcaseè¯å¥ä¸èµ·å®ç°äºç¨åºè¯è¨çä¸ç§ç»æï¼é¡ºåºç»æãåæ¯ç»æã循ç¯ç»æï¼ä¹ä¸çåæ¯ç»æãç®å说ï¼ifè¯å¥å¤æäºæ¡ä»¶ççåï¼å®ä¹äºæ¡ä»¶ä¸ºçåä»ä¹ï¼ï¼ä¸ºååä»ä¹ï¼ã
åæ ·ä½ä¸ºåæ¯é¡ºåºè¯å¥ï¼caseä¸ifåå¨ä¸å®å·®å«ãcaseè¯å¥åªè½å¤æä¸ç§æ¡ä»¶çä¸åå ³ç³»ï¼èifè¯å¥å¯ä»¥å¤æå¤ç§æ¡ä»¶å ³ç³»ãä½å¨ä¸ç§æ¡ä»¶çä¸åå ³ç³»å¤æä¸ï¼caseè¯å¥æ´å ç®åï¼ä¸è¬ç¨äºå¤é¡¹éæ©ï¼ä» éç¨äºå符串å¹é ï¼ï¼æ¯æéé 符ã