23,121
社区成员
发帖
与我相关
我的任务
分享
#include <sys/types.h>
#include <unistd.h>
int main()
{
int hFile;
hFile = open64("testfile", O_RDWR|O_CREAT|O_APPEND|O_LARGEFILE|O_NONBLOCK,S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
char *p = "test";
write(hFile, p, 4);
lseek64(hFile, 0, SEEK_SET);
write(hFile, p, 4);
return 0;
}