Research V7 development
[unix-history] / usr / man / man2 / write.2
CommitLineData
6de44978
KT
1.TH WRITE 2
2.SH NAME
3write \- write on a file
4.SH SYNOPSIS
5.B write(fildes, buffer, nbytes)
6.br
7.B char *buffer;
8.SH DESCRIPTION
9A file descriptor is a word returned from a
10successful
11.I open,
12.I creat,
13.I dup,
14or
15.IR pipe (2)
16call.
17.PP
18.I Buffer
19is the address of
20.I nbytes
21contiguous
22bytes which are written on the output file.
23The number of characters actually written is returned.
24It should be regarded as an error
25if this is not the same as requested.
26.PP
27Writes which are multiples
28of 512 characters long and begin on a 512-byte boundary
29in the file
30are more efficient than any others.
31.SH "SEE ALSO"
32creat(2), open(2), pipe(2)
33.SH DIAGNOSTICS
34Returns
35\-1 on error: bad descriptor, buffer address, or
36count; physical I/O errors.
37.SH ASSEMBLER
38(write = 4.)
39.br
40(file descriptor in r0)
41.br
42.B sys write; buffer; nbytes
43.br
44(byte count in r0)