xref: /original-bsd/usr.bin/write/write.1 (revision c3e32dec)
1.\" Copyright (c) 1989, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" Jef Poskanzer and Craig Leres of the Lawrence Berkeley Laboratory.
6.\"
7.\" %sccs.include.redist.man%
8.\"
9.\"     @(#)write.1	8.1 (Berkeley) 06/06/93
10.\"
11.Dd
12.Dt WRITE 1
13.Os
14.Sh NAME
15.Nm write
16.Nd send a message to another user
17.Sh SYNOPSIS
18.Nm write
19.Ar user
20.Op Ar ttyname
21.Sh DESCRIPTION
22.Nm Write
23allows you to communicate with other users, by copying lines from
24your terminal to theirs.
25.Pp
26When you run the
27.Nm write
28command, the user you are writing to gets a message of the form:
29.Pp
30.Dl Message from yourname@yourhost on yourtty at hh:mm ...
31.Pp
32Any further lines you enter will be copied to the specified user's
33terminal.
34If the other user wants to reply, they must run
35.Nm write
36as well.
37.Pp
38When you are done, type an end-of-file or interrupt character.
39The other user will see the message
40.Ql EOF
41indicating that the
42conversation is over.
43.Pp
44You can prevent people (other than the super-user) from writing to you
45with the
46.Xr mesg 1
47command.
48Some commands, for example
49.Xr nroff 1
50and
51.Xr pr 1 ,
52disallow writing automatically, so that your output isn't overwritten.
53.Pp
54If the user you want to write to is logged in on more than one terminal,
55you can specify which terminal to write to by specifying the terminal
56name as the second operand to the
57.Nm write
58command.
59Alternatively, you can let
60.Nm write
61select one of the terminals \- it will pick the one with the shortest
62idle time.
63This is so that if the user is logged in at work and also dialed up from
64home, the message will go to the right place.
65.Pp
66The traditional protocol for writing to someone is that the string
67.Ql \-o ,
68either at the end of a line or on a line by itself, means that it's the
69other person's turn to talk.
70The string
71.Ql oo
72means that the person believes the conversation to be
73over.
74.Sh SEE ALSO
75.Xr mesg 1 ,
76.Xr talk 1 ,
77.Xr who 1
78.Sh HISTORY
79A
80.Nm
81command appeared in
82.At v6 .
83