#include <unistd.h> ssize_t read(int fd, void *buffer, size_t length);
This function reads at most length bytes from file fd into
buffer. Note that in some cases, such as end-of-file conditions
and text files, it may read less than the requested number of bytes.
At end-of-file, read
will read exactly zero bytes.
The number of bytes read, zero meaning end-of-file, or -1 for an error.
not ANSI, POSIX
char buf[10]; int r = read(0, buf, 10);
Go to the first, previous, next, last section, table of contents.