O'Reilly logo
  • Ivan Petrov thinks this is interesting:

The read form is called pread( ):

#define _XOPEN_SOURCE 500

#include <unistd.h>

ssize_t pread (int fd, void *buf, size_t count, off_t pos);

This call reads up to count bytes into buf from the file descriptor fd at file position pos.

The write form is called pwrite( ):


Cover of Linux System Programming


Positional reads and writes, these do not update the file position!