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