#include
#include
#include
#include
void main(int argc,char **argv)
{
int fd_s;
int fd_t;
char buf[512];
int count =0;
/*打开文件*/
fd_s = open(argv[1],O_RDONLY);
fd_t = open(argv[2],O_RDWR|O_CREAT,0666);
/*读取文件,写入文件*/
while((count = read(fd_s, buf,512) ) >0)
write(fd_t, buf,count);
close(fd_s);
close(fd_t);
}
阅读(209) | 评论(0) | 转发(0) |
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
#include
#include
#include
void main(int argc,char **argv)
{
int fd_s;
int fd_t;
char buf[512];
int count =0;
/*打开文件*/
fd_s = open(argv[1],O_RDONLY);
fd_t = open(argv[2],O_RDWR|O_CREAT,0666);
/*读取文件,写入文件*/
while((count = read(fd_s, buf,512) ) >0)
write(fd_t, buf,count);
close(fd_s);
close(fd_t);
}
相关热门文章
给主人留下些什么吧!~~
评论热议