Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ write(1) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mesg

nroff, troff

pr

sh, Rsh

wall

who



WRITE(1,C)                  AIX Commands Reference                   WRITE(1,C)



-------------------------------------------------------------------------------
write



PURPOSE

Sends messages to other users on the system.

SYNTAX


         +------+                     +------------+
write ---|      |--- user --- line ---|            |---|
         +- -L -+                     +- sitename -+


DESCRIPTION

The write command is used to converse with another logged-in user.  That is,
each user alternately sends and receives short messages from the other's
terminal.  Long messages can be sent by first putting the complete message in a
file and then redirecting that file as input to the write command.

For another user to receive your message, that user must be logged in and must
not have refused message permission.  When a person you are trying to reach is
not logged in, you get the message "user not logged in".  When the person you
are trying to reach has refused message permission, you get the message "write:
permission denied".

When you run the write command, it immediately sends the following message,
along with an attention-getting sound (the ASCII BEL character) to the person
whose login name you entered.

  Message from yourid on yoursitename (ttynn) [date]...

After successful connection, write then sends two ASCII BEL characters to your
terminal to alert you that whatever you enter now is being sent, one line at a
time, to the other user.  Sending continues until you press Ctrl-D, at which
point write sends an end-of-text character to the other terminal and exits.  At
this point, the other user can respond if desired by sending a write message
back.  To carry on an exchange of several messages, you can use the following
convention.  After entering your first message, do not type Ctrl-D to exit
write.  Instead terminate each message with a signal such as o (over) to alert
the other person to reply.  Each user can alternate sending messages, not
typing Ctrl-D until the conversation is finished.

When you write to a user logged in at more than one terminal on your site,
write uses the first login instance found in file /etc/utmp as the message
delivery point, and you get the message:





Processed November 8, 1990        WRITE(1,C)                                  1





WRITE(1,C)                  AIX Commands Reference                   WRITE(1,C)



  userid is logged in more than once on sitename.
  You are connected to line1.
  Other locations are line2.

You can contact this user at another terminal by specifying the line.  line
indicates to which terminal (tty00, for example) the message should be sent.

When your machine is operating as a site in a TCF cluster, you can converse
with users logged into sites anywhere on the cluster.  If the user you specify
is not logged into your local site, write connects to the user at the
lowest-numbered site on the cluster where that user is logged in.  Specify
sitename if you want to write to the user at a specific site.

To specify a line without a user, or a sitename without either line or user,
use a dash (-) in place of the omitted line or user.  You cannot omit both line
and user.

Permission to write to another user is granted or denied by the other user with
the mesg command.  Some commands deny message permission while they are running
to prevent interference with their output.  A user with superuser authority can
write to any terminal regardless of the terminal's message permission.

If you are sending a message to another user on a system on which users may
have selected different character code sets for displaying text in different
languages, the message should be written in either the same code set used by
the recipient or in ASCII characters.

FLAG

-L      Write to user only if that user is logged into the local site.  If the
        -L flag is specified, the sitename argument cannot also be specified.

EXAMPLES

  1. To write a message to a user who is logged in:

      write billie
      I need to see you!  Meet me in the computer room at 12:30.
      Ctrl-D

    If your user ID is "kirk" and you are using terminals "tty3" on site alpha,
    "billie"'s terminal displays:

      Message from kirk on alpha (tty3) [current date] ...
      I need to see you!  Meet me in the computer room at 12:30.
      EOF

  2. To hold a conversation:

      write billie
      Meet me in the computer room at 12:30.
      (o)



Processed November 8, 1990        WRITE(1,C)                                  2





WRITE(1,C)                  AIX Commands Reference                   WRITE(1,C)




    This starts the conversation.  The "(o)" at the end stands for "over".  It
    tells "billie" that you are waiting for a response.  Do not press Ctrl-D if
    you wish to continue.

    Now "billie" replies by typing:

      write kirk
      I'm running tests at 12:30.  Can we meet at 3?
      (o)

    And you might respond:

      OK--the computer room at 3.
      (oo)

    The "(oo)" stands for "over and out," telling "Billie" that you have
    nothing more to say.  If "Billie" is also finished ("oo"), you both press
    Ctrl-D to end the conversation.

  3. To write someone a prepared message:

      write jay <message.text

    This writes the contents of the file "message.text" to "Jay's" terminal.

  4. To write to the person using a certain terminal:

      write - console
      The printer in building 998 has jammed.
      Please send help.
      Ctrl-D

    This writes the message to the person logged in at the terminal
    /dev/console on your site.

FILES

/etc/utmp           Contains user and accounting information for the who,
                    write, and login commands.

RELATED INFORMATION

See the following commands:  "mesg,"  "nroff, troff,"  "pr," "sh, Rsh," "wall"
and "who."










Processed November 8, 1990        WRITE(1,C)                                  3



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026