10 个最酷的 Linux 单行命令

UNIX环境高级编程(APUE)例程 1-1

adam posted @ 2010年12月08日 22:17 in Linux/UNIX , 902 阅读

 

#include<apue.h>
#include<dirent.h>
 
int main(int argc, char *argv[])
{
    DIR  *dp;
    struct dirent *dirp;
     
    if (argc  !=  2)
    {   
        err_quit("usage : ls directory_name ");
     }
     if ((dp  =  opendir (argv[1]))== NULL)
        err_sys("cant open %s",argv[1]);
     while ((dirp = readdir (dp))!= NULL)
     {
         printf("%s \n",dirp->d_name);
          
     }
      
     closedir(dp);
     exit(0);
}

 

Avatar_small
civaget 说:
2023年12月13日 04:38

I witnessed remarkable growth in my site's authority and traffic with 백링크업체's content marketing.

Avatar_small
civaget 说:
2023年12月20日 18:06

제주오피's commitment to transparency is commendable. It's a breath of fresh air in an industry often shrouded in mystery.

Avatar_small
civaget 说:
2023年12月21日 18:33

강남오피's dedication to relaxation shines through its services. With over 70 locations, it's the ultimate choice for massages, skincare, and spa experiences in Gangnam.

Avatar_small
civaget 说:
2023年12月23日 21:09

스포츠중계 is my portal to the world of sports entertainment.

Avatar_small
civaget 说:
2023年12月24日 22:33

오산휴게텔 is a haven of relaxation. The diverse massage services and attentive staff ensure a memorable escape from the hustle and bustle of life.

Avatar_small
civaget 说:
2023年12月26日 19:46

티비위키 offers a vast array of OTT services, all for free!


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter