Research V7 development
[unix-history] / usr / man / man1 / write.1
CommitLineData
e6efffa8
DR
1.TH WRITE 1
2.SH NAME
3write \- write to another user
4.SH SYNOPSIS
5.B write
6user [ ttyname ]
7.SH DESCRIPTION
8.I Write
9copies lines from your terminal to that of
10another user.
11When first called,
12it sends the message
13.PP
14 Message from yourname yourttyname...
15.PP
16The recipient of the message should write back at this point.
17Communication continues until an end of file is
18read from the terminal or an interrupt is sent.
19At that point
20.I write
21writes `EOT' on the other terminal and exits.
22.PP
23If you want to write to a user who is logged in more than once,
24the
25.I ttyname
26argument may be used to indicate the
27appropriate terminal name.
28.PP
29Permission to write may be denied or granted by use of the
30.I mesg
31command.
32At the outset writing is allowed.
33Certain commands, in particular
34.I nroff
35and
36.IR pr (1)
37disallow
38messages in order to prevent messy output.
39.PP
40If the character `!' is found at the beginning of a line,
41.I write
42calls the shell
43to execute the rest of the
44line as a command.
45.PP
46The following protocol is suggested for using
47.IR write :
48when you first write to another user, wait for him to
49write back before starting to send.
50Each party should end each message with a distinctive
51signal\(em\fB(o)\fR
52for `over' is conventional\(emthat the other may reply.
53.B (oo)
54for `over and out' is suggested when conversation
55is about to be terminated.
56.SH FILES
57/etc/utmp to find user
58.br
59/bin/sh to execute `!'
60.SH "SEE ALSO"
61mesg(1), who(1), mail(1)