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
Ïà¹ØÎĵµ£º
³µË®ÂíÁú£¬ÂҼǵ㶫Î÷¡£
Ò»¿ªÊ¼²»ÈÃÎÒ±àÒëÄںˣ¬½á¹ûÊÇÏÂÃæµÄÎÊÌâµ¼Ö£º
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 Éú³É ......
#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 ......
List_Head
²Ù×÷ϵͳÄں˾³£ÐèҪά»¤Êý¾Ý½á¹¹¡£ÄÚºËÓбê×¼µÄÑ»·Á´±í¡¢Ë«Ïò
Á´±íµÄʵÏÖ¡£ÔÚ
<Linux/list.h>
ÎļþÖж¨ÒåÁËÒ»¸ö
list_head
ÀàÐͼòµ¥½á¹¹£º
struct
list_head {
struct list_head *next, *prev;
};
ͨÓÃÁ´±íµÄ³£ÓÃÓÃ;Êǽ«Ä³Ò»¸öÊý¾Ý½á¹¹±¾Éí´®³ÉÁ´±í£¬»ò½«Ä³Ð©Á ......
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 ......
ÔÚдÕâƪÎÄÕµÄʱºò£¬ÓÐ323¸ö²»Í¬µÄ·¢Ðаæ
±»
distrowatch.com¹Ø×¢¡£Óеı»³Æ×÷Ehad£¬ÓеĽÐ×öEstrellaRoja¡£ºÜ¶àÃû×ÖÀïÃ涼ÓаüÀ¨Ò»¸ö“X”×Öĸ£¬Ò»Ð©Õ¹Ê¾ÌØÐԵļªÏé
ÎïºÍ×Ô¼ºµÄ½»Á÷ÉçÇø¡£ËûÃǵ±Öв¢²»ÊÇËùÓеĶ¼ÊÇÍêÈ«»ùÓÚLinux»ù´¡¿ò¼ÜºÍ·¢Õ¹»îÔ¾µÄ£¬µ«´ó¶àÊýÖ÷Á÷·¢ÐаæÈç´Ë¡£ÕâÊÇÒ»¸öÑ¡Ôñ¶àÑùµÄÊÀ½ç£¬ÊÇ ......