#include #include #include #include main(int argc, char **argv) { int i; for (i=1; i 0) { int wb = write(ofile, buf, rbytes); if (wb < 0) { perror(fname); break; } if (wb < rbytes) { fprintf(stderr, "%s: disk full\n", fname); exit(1); } } close(ifile); close(ofile); }