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

£¨ÐÂÊÖÎÊÌ⣩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 ?

¿ÉÒÔÔÚ±éÀúĿ¼ʱ¹ýÂË

×Ö·û´®±È½Ï


Ïà¹ØÎÊ´ð£º

ARM LINUXÉÏÓÃCдÎļþµÄÎÊÌâ

C/C++ code:

char Time="2009-9-23";
FILE *fpOut=fopen("1.txt","w+");
if(fpOut==NULL)
return ;

fwr ......

linux»·¾³ÏÂgethostbynameº¯ÊýÎÊÌâ - C/C++ / CÓïÑÔ

дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
   
  struct hostent *hp; 
char AlarmDevIP[20];  
  int x2;

hp = gethostbyname("www.google.com");
if (hp)
{ ......

linux gcc OCI ±àÒëÎÊÌâ

ÔÚlinuxÏ£¬ÔõÑù±àÒëOCIµÄ³ÌÐò£¿ËüµÄgccÖ¸ÁîÊÇʲô£¿ÎÒ´ÓÍøÉÏÕҵͼ²»ÄÜÓã¡»¹ÓУ¬ÎÒÔÚlinuxÓÃCÓëoracleÁ¬½Ó£¬ÎÒ¶¼ÐèÒª°²×°oralceµÄÄÄЩÈí¼þ£¿Ö»ÐèÒªoralceµÄ¿Í»§¶Ë£¬ÓëOCIµÄ¿âô£¿±ðµÄ»¹ÐèҪô£¿
Çë¸ßÊÖÖ¸½Ì£¡ ......

linux °²×°xinetdµÄÎÊÌâ

ÒòΪ°²×°cvsÒªÓõ½xinetd·þÎñ£¬·¢ÏÖ»úÆ÷ÉÏûÓС£¡£¾Í´ÓÍøÉÏÏÂÔØÁ˸ö×°ÉÏ£¬
SQL code:
[root@localhost ~]# rpm -qa xinetd
[root@localhost ~]# rpm -qa telnet
telnet-0.17-38.el5
[root@localhost ~]#
¸ ......

linuxϵͳÁ¬½ÓwindowsµÄFTP

ÎÊÌâÊÇÕâÑùµÄ£¬linuxϵͳÁ¬½ÓwindowsµÄFTPÓõÄÊÇʲô¶Ë¿Ú£¬ÊDz»ÊÇËæ»úµÄ£¬¿É²»¿ÉÒÔ¸øËü¹Ì¶¨Ä³¸ö¶Ë¿Ú£¬ÒòΪÎÒ·À»ðǽ´ò¿ªµÄʱºòftpÁ¬²»ÉÏ£¬·À»ðǽ¹Ø±Õºó£¬ftp¿ÉÒÔÁ¬µÄÉÏ
ß×  ÔõôûÈ˰ïæ½â´ðÄØ

¼ÌÐøµÈ´ý

......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ