Writes data (blocks even if writing to the screen).
#include <unistd.h> ssize_t write ( int fildes, const void *buf, size_t nbytes);
(IN) Specifies a file descriptor.
(IN) Points to the address at which to start transmitting data.
(IN) Specifies the number of bytes to write.
If successful, returns the number of bytes of data actually written. Otherwise, returns -1 and sets errno to one of the following:
The write function attempts to write nbytes from the buffer pointed to by buf to the file associated with the open file descriptor, fildes.
The fildes value is returned by open, sopen, or creat. The access mode must have included either O_WRONLY or O_RDWR when the file was opened.
The data is written to the file at the end when the file was opened with O_APPEND included as part of the access mode; otherwise, it is written at the current file position for the file in question. This file position can be determined with tell and can be set with lseek.