Sending a message to another logged-in user

You can send messages to other logged-in users over the system in real time with the write command. Each user alternately sends and receives short messages from the other workstation. Long messages can be sent by putting the complete message in a file and then redirecting that file as input to the write command.

For another user (as specified by the User parameter) to receive a message, that user must be logged in and must not have refused message permission. When a message is sent to a user who is not logged in, the message user not logged in displays. If the message is sent to a user who has refused message permission by setting the mesg command to no, the message write: permission denied displays.

When the write command is issued, it immediately sends the following message, along with an attention-getting sound (the ASCII BEL character) to the message recipient or target:
Message from SenderID on SenderHostname (ttynn) [Date] ... 

With a successful connection, the write command sends two ASCII BEL characters to both workstations. The beep alerts the sender that the message can begin, and it alerts the receiving user that a message is coming.