linux c mkdir´´½¨µÝ¹éĿ¼
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#define err(msg) perror(msg)
static void mkdirs(const char *dir)
{
char tmp[1024];
char *p;
if (strlen(dir) == 0 || dir == NULL) {
printf("strlen(dir) is 0 or dir is NULL.\n");
return;
}
memset(tmp, 0, sizeof(tmp));
strncpy(tmp, dir, strlen(dir));
if (tmp[0] == '/' && tmp[1]== '/')
p = strchr(tmp + 2, '/');
else
p = strchr(tmp, '/');
if (p) {
*p = '\0';
mkdir(tmp,0777);
chdir(tmp);
} else {
mkdir(tmp,0777);
chdir(tmp);
return;
}
mkdirs(p + 1);
}
int main(void)
{
 
Ïà¹ØÎĵµ£º
×ªÔØ×Ô£ºhttp://bbs.dp168.com/thread-23703-1-1.html
Redhat
¼ò½é£º
Red Hat LinuxÊÇÉÌÒµÉÏÔË×÷×î³É¹¦µÄÒ»¸öLinux·¢ÐÐÌ×¼þ£¬ÆÕ¼°³Ì¶ÈºÜ¸ß£¬ÓÉRed Hat¹«Ë¾·¢ÐС£
Red Hat
Linux¿ÉËãÊÇÒ»¸ö“ÖÐÄêµÄ”Linux·¢ÐÐÌ×¼þ£¬1.0°æ±¾ÓÚ1994Äê11ÔÂ3ÈÕ·¢ÐС£ËäÈ»ÆäÀúÊ·²»¼°Slackware°ãÓÆ¾Ã£¬µ«±ÈÆðºÜ¶àµÄ
Linux·¢ÐÐÌ×¼þ ......
ÐźÅÖ¸¶¨´¦Àíº¯Êý
void (*signal (int signum,void (*handle)(int)))(int);ÉèÖÃij¸öÐźŵĴ¦Àí·½·¨
int sigaction(int signum,const struct sigaction *act,struct sigaction *oldact);ÓÃÓÚ¼ì²é»ò¸Ä±ä½ø³ÌÔÚ½Óµ½ÐźÅʱµÄ¶¯×÷
Ðźż¯²Ù×÷º¯Êý
static inline void sigaddset(sigset_t *set,int _sig);
static inline voi ......
4.1. Introduction to Linux Routing
The design of IP routing allows for very simple route definitions for small networks, while not hindering the flexibility of routing in complex environments. A key concept in IP routing is the ability to define what addresses are locally reachable as oppose ......
Ê®ÔÂÄ©ubuntu9.10·¢²¼£¬Á¢¿Ì»»ÉÏÁËеģ¬ÎÒÏë×Ô¼º²¢²»ÊÇÔÚ¿ÌÒâ×·Çóеİ汾¡£Ö»ÊÇÒÔǰÔÚµçÄÔÉÏÓÃwubi×°µÄÄǸöylmfµÄÊÇÔÚ²»ºÃ
Óã¬firfoxÖ»ÄÜÊÇ3.0°æ±¾µÄ£¬×ÔÐбàÒëÈí¼þ»¹²»»á£¬ÓÃwine×°Ò»¸öie¾ÓÈ»Óõ½µçÄÔËÀ»ú£¬ÊÇÔڸоõ²»µ½linuxÓÐʲôºÃµÄ£¬¸üÈÃÈËÄÑÊܵÄÊÇ×Ö
ÌåÏÔʾЧ¹û²î£¬firfox
operaʹÓÃÒ»»ÎÒ»»ÎµÄ£¬ËÙ¶ÈÌ«Âý£¬Õû¸ ......