#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>

int main()
{
        char block[1024];
        int in,out;
        int nread;

        in=open("file.in",O_RDONLY);
        out=open("file.out",O_WRONLY|O_CREAT,S_IRUSR|S_IWUSR);
        while ((nread=read(in,block,sizeof(block)))>0)
                write(out,block,nread);
        exit(0);

}

相关文章:

  • 2022-12-23
  • 2022-01-08
  • 2021-08-09
  • 2022-02-14
  • 2021-08-31
  • 2021-09-16
  • 2021-04-11
  • 2021-09-26
猜你喜欢
  • 2022-02-08
  • 2022-01-09
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2021-12-08
  • 2022-02-07
相关资源
相似解决方案