1#include <fcntl.h> 2#include <stdio.h> 3#include <unistd.h> 4 5int main() { 6 int fd = open("some.file", O_RDWR); 7 char buffer[100]; 8 read(fd, buffer, 1); 9 write(fd, "some data", 9); 10 close(fd); 11} 12 13