£¨ÐÂÊÖÎÊÌ⣩linuxĿ¼ÎÊÌâ
ÎÒÒª²éÕÒĿ¼/home/riverdream/ϵÄËùÓеģª.CPPÎļþ
int main(int argc, char *argv[])
{
char str[] = "/home/riverdream/";
DIR* pDir = NULL;
struct dirent* ent = NULL;
pDir = opendir(str);
if (NULL == pDir)
{
printf("Source folder not exists!\n");
return 1;
}
while (NULL != (ent=readdir(pDir)))
{
if(ent->d_name[0]!='.')
{
if (ent->d_type==8)
printf("%s\n", ent->d_name);
}
}
closedir(pDir);
pDir = NULL;
ent = NULL;
return 1;
}
ÄǸöĿ¼Ӧ¸ÃÔõôд£¿£¿£¿
char str[] = "/home/riverdream/£ª.cpp";ÕâÑù²»ÐУÀ£¡Ð»Ð»»Ø´ð¡¢¡¢¡¢
Ŀ¼ÖеÄ"/"ÐèҪתÒåµÄ°É
ÎÒÕâÑùдchar str[] = "/home/riverdream/"; ¿ÉÒÔÕÒµ½Ä¿Â¼ÏµÄËùÓÐÎļþ¡£¾ÍÊDz»ÖªµÀÔõôÕÒÖ¸¶¨ºó׺µÄÎļþ¡£
*.cppÓÖ²»ÊÇĿ¼....... open sha ?
¿ÉÒÔÔÚ±éÀúĿ¼ʱ¹ýÂË
×Ö·û´®±È½Ï
Ïà¹ØÎÊ´ð£º
¸ø¸öµØÖ·£¬»òÕß·¢µ½ÎÒÓÊÏäÒ²ÐÐ wrongagain98@163.com
×îºÃÊÇÊÓƵµÄ£¬²»ÊÇÊÓƵÆÕͨµÄÒ²ÐС£
Ö÷ÒªÊÇÁ½·½Ã棺
1.ÔõÑù±à¼¡¢±àÒëºÍµ÷ÊÔ³ÌÐò¡£Ï£ÍûÄÜÒ»²½²½½²Çå³þ£¬ÈçºÎ°²×°¡¢ÈçºÎÅäÖõȡ£²»Òª¾Íֻ˵¾ä¡°¾ÍÓ ......
Ä¿±ê£ºµ±ÍøÂçÖÐÓÐÊý¾Ýµ½´ï»òÕß³¬Ê±£¬³ÌÐò½øÈëÏÂÒ»´ÎÑ»·¡£
ÎÊÌ⣺select()º¯Êý²»Æð×÷Ó㬳ÌÐò²»»áÔÚselectµÄµØ·½×èÈûÒ»Ã룬²¢ÇÒµ±ÍøÂçÉÏÓÐÊý¾ÝµÄʱºò£¬selectµÄ·µ»ØÖµÈÔȻСÓÚ0
#include <s ......
ÐèÒªÔÚlinuxÏÂÓÃÖжϷ½Ê½À´Ð´Ò»¸ö´®¿ÚµÄ³ÌÐò£¬ÏÖÔÚûÓÐ˼·£¬ÍøÉÏÓÐÈË˵ÓÃselect,signal,taskletº¯ÊýµÄ£¬µ«ÊÇÎÒû¿´¶®£¬Ï£ÍûÓÐ×ö¹ýµÄ¸øÒ»ÏÂÀý³Ì£¬¶àл£¡
¾ÍÊÇÄܹ»µ±´®¿ÚÊý¾ÝÀ´ÁÙʱ×Ô¶¯Í¨Öª´®¿Ú¶ÁÈ¡Êý¾Ý£¬ÀàËÆÓÚÖÐ ......
ÔÚlinuxÏ£¬ÔõÑù±àÒëOCIµÄ³ÌÐò£¿ËüµÄgccÖ¸ÁîÊÇʲô£¿ÎÒ´ÓÍøÉÏÕҵĶ¼²»ÄÜÓã¡»¹ÓУ¬ÎÒÔÚlinuxÓÃCÓëoracleÁ¬½Ó£¬ÎÒ¶¼ÐèÒª°²×°oralceµÄÄÄЩÈí¼þ£¿Ö»ÐèÒªoralceµÄ¿Í»§¶Ë£¬ÓëOCIµÄ¿âô£¿±ðµÄ»¹ÐèҪô£¿
Çë¸ßÊÖÖ¸½Ì£¡
......
LinuxÐû´«ÉϵÄ3´óÎóÇø
1.¹ã¸æζ̫Ũ£¬¹ý·Ö¿äÕÅÓû§ÌåÑé¡£
ÕâÊÇLinuxÐû´«ÖÐ×î´óµÄ벡£¬Ò²Ðí¶ÔÏàÐŹã¸æµÄÀÏÍâÓÐÒ»µãÓ㬵«¶ÔÓÚÔ±¾¾Í¶Ô¹ã¸æÓз´¸Ð̬¶ÈµÄÖйúÓû§À´Ëµ£¬µ±ÕæÕýʹÓÃLinuxºó·¢ÏÖ ......