?? cp.c
字號(hào):
//copies one file to another #include<fcntl.h>#include<sys/stat.h>#define BUFSIZE 1024 #include<stdlib.h>int main(int argc ,char **argv){ int fd1,fd2; int n,j; char buf[BUFSIZE]; fd1=open(argv[1],O_RDONLY); for(j=argc;j>1;j--) {fd2=open(argv[j-1],O_WRONLY|O_CREAT|O_TRUNC|S_IRUSR|S_IWUSR|S_IROTH); while((n=read(fd1,buf,BUFSIZE))>0) write(fd2,buf,n); close(fd2); } close(fd1); exit(0);}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -