将标准输入复制到标准输出
时间:2010-12-05 来源:longmenyu
ssize_t read(int fd, void *buf, size_t count);
read() attempts to read up to count bytes from file descriptor fd into the buffer starting at buf.
2. #include <unistd.h>
ssize_t write(int fd, const void *buf, size_t count);
write() writes up to count bytes from the buffer pointed buf to the file referred to by the file descriptor fd.
该程序可用于复制任一Unix普通文件。 程序清单:
#include <stdio.h> |