Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

creat(2)

open(2)

pipe(2)

WRITE(2)  —  UNIX Programmer’s Manual

NAME

write − write on a file

SYNOPSIS

write(fildes, buffer, nbytes)
int fildes;
char *buffer;
int nbytes;

DESCRIPTION

A file descriptor is a word returned from a successful open, creat, dup, or pipe(2) call.

Buffer is the address of nbytes contiguous bytes which are written on the output file.  The number of characters actually written is returned.  It should be regarded as an error if this is not the same as requested. 

Writes which are multiples of 512 characters long and begin on a 512-byte boundary in the file are more efficient than any others. 

SEE ALSO

creat(2), open(2), pipe(2)

DIAGNOSTICS

Returns −1 on error: bad descriptor, buffer address, or count; physical I/O errors. 

BUGS

No write errors to the file system are returned to the user. 

7th Edition

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026