#include #include int main(int argc, char *argv[]){ int fd1 = open(argv[1],O_RDONLY); int fd2 = open(argv[2],O_WRONLY|O_CREAT|O_TRUNC,0666); char buffer[1000]; int bytes; while(1){ bytes = read(fd1, buffer,1000); if (bytes<=0){ break; } write(fd2, buffer, bytes); } close(fd1); close(fd2); }