![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C89
d1306937299
攻城狮
展开
-
linux 实现cat命令
#include #include #include #include #include #include int main(int argc,char **argv) { int fd; char buf[64]; int ret; fd=open(argv[1],O_RDONLY); /*以只读的方式打开文件*/ if(fd { perror("o原创 2015-09-13 16:39:32 · 332 阅读 · 0 评论 -
linux 系统编程1
在Linux系统中一切皆文件,在Linux系统中一共有7种文件类型:1.普通文件 2.目录文件 3.字符设备文件 4.块设备文件 5.链接文件 6.管道文件 7.套接字文件 打开/创建一个文件 int open(const char *pathname,int flags); int open(const char原创 2015-09-13 09:54:30 · 210 阅读 · 0 评论