write(1) write(1)NAME write - writes to another user SYNOPSIS write user [line] ARGUMENTS line Indicates which line or terminal (such as (tty00)) to send the message to. If this argument is not specified, the first writable instance of the user found in /etc/utmp is assumed and the following message posted: user is logged on more than one place. You are connected to terminal. Other locations are: terminal user Specifies the name of the person you wish to send a message to. DESCRIPTION write copies lines from your terminal to that of another user. Writing to others is normally allowed by default. Certain commands, in particular nroff(1) and pr(1) prevent messages from being sent to avoid interference with their output. However, if the user has superuser permissions, messages can be forced onto a write-inhibited terminal. If the character ! is found at the beginning of a line, write calls the shell to execute the rest of the line as a command. Permission to write may be denied or granted by use of the mesg command. The following protocol is suggested for using the write command: ⊕ When you first write to another user, wait for them to write back before starting to send. ⊕ Each person should end a message with a distinctive signal (i.e., (o) for ``over'') so that the other person knows when to reply. The signal (oo) (for ``over and out'') is suggested when conversation is to be terminated. EXAMPLES If you want to write to a user account named cheryl at terminal (tty) number 2, enter: January 1992 1
write(1) write(1)write cheryl tty2 If Cheryl has her terminal set to receive messages with mesg y (refer to mesg(1)), she will receive the message: Message from yourname (tty??) [date]... where tty?? is your terminal number and date is the time and date the message was sent. Once the connection is successful, two bells are sent to your terminal which indicates that the data you are typing is being sent. The user, Cheryl, should write back at this point. Communication can continue until an end of file is read from the terminal, an interrupt is sent from either user, or the recipient (Cheryl, in this example) has executed the mesg n command. When this occurs, write writes EOT on the other terminal and exits. STATUS MESSAGES AND VALUES user is not logged in The person you are trying to write to is not logged in. Permission denied The person you are trying to write to denies that permission with the mesg command. Warning: cannot respond, set mesg -y Your terminal is set to mesg n and the recipient cannot respond to you. Can no longer write to user The recipient has denied permission with the mesg n command after you started writing. FILES /bin/write Executable file /etc/utmp Temporary file /bin/sh Shell file SEE ALSO mail(1), mesg(1), nroff(1), pr(1), sh(1), talk(1N), who(1) wall(1M) in A/UX System Administrator's Reference 2 January 1992