当前位置: 技术问答>linux和unix
Linux系统的文件操作
来源: 互联网 发布时间:2017-04-11
本文导语: #include #include #include #include #include #define N 1024 int main(int argc,char *argv[]) { char buf[N]; char *ptr; int fd1; int fd2; int readsize; int writesize; if(fd1=open("/root/program/sfile/openfile.c",O_RDONLY)
#include
#include
#include
#include
#include
#define N 1024
int main(int argc,char *argv[])
{
char buf[N];
char *ptr;
int fd1;
int fd2;
int readsize;
int writesize;
if(fd1=open("/root/program/sfile/openfile.c",O_RDONLY)