1. 首页
  2. 数据库
  3. 其它
  4. UNIX环境高级编程_第三版中文版.pdf

UNIX环境高级编程_第三版中文版.pdf

上传者: 2021-03-09 04:31:55上传 PDF文件 5.91MB 热度 16次
#include rourhdr. hr int main(int argc, char *argv []) DIR struct dirent f (argc 2 err quit("a single argument (the directory name )is required"); if ((dp opendir(argv[1]))== NULL err sys("can't open s", argv[1])i while( (dirp readdir(dp))!=NULL printf("%s\n", dirp->d name)i closedir(dp)i exit(0); Include ourhdr h" tdefine BUFFSIZE 8192 int main(void) int char buf [BUFFSIZe]; while( (n= read (STDIN FIleNO buf, BUFFSIZE))>0) f (write(sTDOUT FILENo, buf, n)!= n err sys("write error") if (n
用户评论