#include #include #include #include #define GB (1024ul*1024ul*1024ul) #define POS (3*GB) int main() { int fd; char zero = 0; if((fd = open("big-file.test",O_RDWR|O_CREAT)) == -1) return 1; if((lseek(fd,POS,SEEK_SET) == -1)) return 2; if((write(fd,&zero,1) == -1)) return 3; close(fd); return 0; }