man(1) Manual page archive


     WRITE(1)                                                 WRITE(1)

     NAME
          write, mesg - write to other users, allow or forbid messages

     SYNOPSIS
          write person ...

          mesg [ n ] [ y ]

     DESCRIPTION
          Write copies lines from your terminal to terminals of other
          persons designated either by login name or (to circumvent
          occasional ambiguities) by terminal name as given by who(1).
          It announces to each person your login name, your terminal,
          and the other persons. To respond, each recipient should
          execute a corresponding write to the persons he wants to
          talk to.

          When you are writing to more than one person, your messages
          are identified to the recipients.  Writing ceases upon end
          of file or interrupt, and the message EOF is sent to the
          others.

          Write recognizes certain commands during a conversation:

          !cmd Execute a shell on the string cmd and then return to
               write.

          :a person
               Add person to the list of people to whom you are talk-
               ing, and send an appropriate announcement to all par-
               ties.  They must do :a for themselves if they want to
               include the new person.

          :d person
               Drop person from your list and make appropriate
               announcements.

          :l   Print a list of people to whom you are talking.

          The following protocol is suggested for using write. When
          you invoke write, wait for the other user to write back
          before starting to send.  Each party should end each message
          with a distinctive signal that the other may reply - the
          customary convention is `(o)' for `over'; (oo) for `over and
          out' is suggested when conversation is about to be termi-
          nated.

          Mesg with argument n forbids messages via write(1) by revok-
          ing non-user write permission on the user's terminal.  Mesg
          with argument y reinstates permission.  All by itself, mesg

     WRITE(1)                                                 WRITE(1)

          reports the current state without changing it.

          Certain commands, in particular nroff and pr(1) disallow
          messages in order to prevent messy output.

     FILES
          to find user
          to execute `!'

     SEE ALSO
          who(1), mail(1), vismon(9.1)

     DIAGNOSTICS
          Mesg yields exit status 0 if messages are receivable, 1 if
          not, 2 on error.

     BUGS
          Mux(9.1) generally prevents the receipt of write messages,
          but vismon(9.1) permits them.
          Messages ought to be identified when the recipient is
          receiving from more than one writer, rather than when a
          writer is sending to more than one recipient, but that
          requires cooperating processes and isn't worth the effort.