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

linuxÏÂÊä³ö±ê×¼´íÎóµÄ·½·¨


GNU glibcÌṩһ¸ö¶ÔprintfµÄÀ©Õ¹£¬Ö±½Óprintf("%m"),¿ÉÒÔÊä³ö±ê×¼µÄ´íÎóÐÅÏ¢£¬ÀýÈçÏÂÃ棺
#include <stdio.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
int main()
{
        if (open("/usr/test",0) < 0)
        {
                printf("%m \n");
                printf("%s \n",strerror(errno));
        }
        return 0;
}
Êä³öΪ :
No such file or directory 
No such file or directory 


Ïà¹ØÎĵµ£º

Linux ÔӼǣ¨Ò»£©

³µË®ÂíÁú£¬ÂҼǵ㶫Î÷¡£
Ò»¿ªÊ¼²»ÈÃÎÒ±àÒëÄںˣ¬½á¹ûÊÇÏÂÃæµÄÎÊÌâµ¼Ö£º
1. sudo --- ÄÃrootÉí·ÝÖ´ÐÐ
2. apt-cache search ncurse --- ɨÃèËùÓдøncurseµÄ×ÊÔ´
3. apt-get install libX-dev --- °²×°¿ª·¢ÓõÄlib¿â
4. cp -r --- È«Ãæ¾µÏñ¸´ÖÆ
5. bz2 --- ѹËõ tar jcvf ½âѹ tar jxvf
6. Ubuntu Éú³É ......

LinuxÏ»ñÈ¡MACµØÖ·

#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <netinet/if_ether.h>
#include <string.h>
#include <netinet/ether.h>
#include<unistd.h>
int main(i ......

linuxÄÚºËÖеÄHlistÓëList_head½á¹¹

List_Head
²Ù×÷ϵͳÄں˾­³£ÐèҪά»¤Êý¾Ý½á¹¹¡£ÄÚºËÓбê×¼µÄÑ­»·Á´±í¡¢Ë«Ïò
Á´±íµÄʵÏÖ¡£ÔÚ
<Linux/list.h>
ÎļþÖж¨ÒåÁËÒ»¸ö
list_head
ÀàÐͼòµ¥½á¹¹£º
struct
list_head {
  

struct list_head *next, *prev;
};
 
ͨÓÃÁ´±íµÄ³£ÓÃÓÃ;Êǽ«Ä³Ò»¸öÊý¾Ý½á¹¹±¾Éí´®³ÉÁ´±í£¬»ò½«Ä³Ð©Á ......

Why do We Choose Linux?

Linux, named after the inventor, Linus Torvalds, is a so different OS for everyone against Windows. To everyone who used to use Windows, Linux need us to do more for everything which we usually do by computer, such as playing a video.
Someone says, Linux is for the ones who are good at the computer ......

ÈçºÎÑ¡Ôñ×îÊʺÏÄãµÄLinux·¢Ðаæ


ÔÚдÕâƪÎÄÕµÄʱºò£¬ÓÐ323¸ö²»Í¬µÄ·¢Ðаæ
±»
distrowatch.com¹Ø×¢¡£Óеı»³Æ×÷Ehad£¬ÓеĽÐ×öEstrellaRoja¡£ºÜ¶àÃû×ÖÀïÃ涼ÓаüÀ¨Ò»¸ö“X”×Öĸ£¬Ò»Ð©Õ¹Ê¾ÌØÐԵļªÏé
ÎïºÍ×Ô¼ºµÄ½»Á÷ÉçÇø¡£ËûÃǵ±Öв¢²»ÊÇËùÓеĶ¼ÊÇÍêÈ«»ùÓÚLinux»ù´¡¿ò¼ÜºÍ·¢Õ¹»îÔ¾µÄ£¬µ«´ó¶àÊýÖ÷Á÷·¢ÐаæÈç´Ë¡£ÕâÊÇÒ»¸öÑ¡Ôñ¶àÑùµÄÊÀ½ç£¬ÊÇ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ