man to (Commandes) - send a one line message to another user.

NAME

to - send a one line message to another user.

SYNOPSIS

to [-ac alias user] [-b] [-ec user] [-h] [-l] [-r] [-tc term] [-uc alias] [-n] [-y] [-Pc pseudonym] [-Gc gonereply] [-Nc noreply] [-Yc yesreply] [-Ic idlereply] [-Xc excludereply] [ user [ message ] ]

DESCRIPTION

to sends a short message to another user. The default format for the message that the destination user receives is:

-=> From user ( userid@host ) on ttyxx at 12:00 :-

message

The recipient of the message can, at this point, choose to reply using the same method. If the recipient has defined an auto-reply message, you will receive a message back of the form:

-=> Auto-reply from username :-

message

All of the arguments to to after the username are treated as part of the message. If a message isn't specified, then you are prompted to enter a message interactively. This is useful if you wish to enter a message that has characters which would need to be escaped from the shell, and you're too lazy to do that. If no message is entered, then `I would like to talk to you' is sent.

You can specify a user by a username, an alias, or with `.' (a period.) The use of a period indicates that you wish to send the message to the last person that you sent a message to (if you've sent one.) The message will be sent to the same tty as last time unless you specify a new tty via the -t option.

If an alias is defined for the user string you entered, it will be used, otherwise to will attempt to send the message to the user on the system with that name.

If the recipient is logged on in more that one place, the message will be sent to the terminal with the least idle time (unless a specific terminal is requested via -t.) If you are sending a message to yourself, the current terminal will only receive the message if you explicitly state it as the destination terminal (This is useful if a friend is logged under your userid and you wish to send them a message.)

You can exclude a user from transmitting a message to you by adding them to your exclude list (by using the -e command line option.)

Auto-reply messages are returned to you depending upon the conditions in which the message was received. They are:

gone
The auto-reply for when the recipient isn't logged on.
idle
The auto-reply for when you are idle more than 5 minutes (overrides the yes message.)
no
The auto-reply for when the message didn't get through.
yes
The auto-reply for when the message was successfully sent. (Useful for when you are working or you're temporarily busy, and want to let the message to still get through.)
exclude
The auto-reply message to people you've excluded.

By default, to uses your name from the /etc/passwd file. This is overridden (in ascending order) by the environment variable NAME, the environment variable PSEUDONYM, and finally, the -p command line option.

If you have your messages disabled, and you are sending a message to a user other than yourself, you will receive a warning telling you that the the recipient can't respond.

OPTIONS

to accepts the following options (in any combination):

-a alias userid
Define an alias, alias for the user userid.
-b
Beep the recipient (with an ASCII BELL character.)
-e userid
Add userid to the list of people you've excluded from sending you messages.
-h
Display a usage and help page.
-l
List all the aliases that you have defined.
-r
Display some status about to, including: mesg status, current name, current terminal, yes auto-reply, no auto-reply, gone auto-reply, and last user.
-t term
Force the message to be sent to the terminal term. It will only be sent if the recipient is currently using that terminal.
-u alias
Remove alias from your alias list.
-n, -y
Set the mesg status to off or on respectivly. This performs the same purpose as mesg(1).
-P pseudonym
Sets your pseudonym.
-Y yesmess
Sets your auto-reply message for when a message gets through successfully.
-I idlemess
Sets your auto-reply message for when a message gets through successfully and the recipient (you) has been idle for more than five minutes.
-N nomess
Sets your auto-reply message for when a transmission is unsuccessful.
-G gonemess
Sets your auto-reply message for when you aren't logged on.
-X excludemess
Sets your auto-reply message to send to a person who you've excluded.
-V
Display the usage and copyright information.

ENVIRONMENT

PSEUDONYM
Name to display when sending messages and auto-replies.
NAME
Used if PSEUDONYM isn't defined.

FILES

$HOME/.torc
/etc/utmp
/etc/passwd

The .torc file is an ASCII file, which may be directly edited rather than using the command line options (although the author doesn't recommend this technique.) Each line has the following format:

- A single character type specifier (case insensitive, but shown with case here for mnemonic reference with the command line options.)

- A single space

- The arguments to the command.

The following characters are valid as type specifiers:

.
The last person to whom you sent a message.
:
The tty of the last person to whom you sent a message.
Y
The yes auto-reply.
N
The no auto-reply.
G
The gone auto-reply.
I
The idle auto-reply.
X
The exclude auto-reply.
P
The pseudonym which is printed in the auto-reply.
a
An alias. This takes the format of alias userid, with whitespace separating the two elements
e
An excluded user.

An unknown specifier or illegal line will be silently ignored by to.

SEE ALSO

mesg(1), utmp(5), talk(1), write(1).

LIMITATIONS

The maximum length of a userid is 8 characters. The maximum length of an alias is 16 characters. The maximum length of an auto-reply, pseudonym, or message is 256 characters. Any non-ASCII, or control characters in the message will be replaced with a `?'.

to can only send an auto-reply message to another user if that user has world read access (-rw-r--r--) to your .torc file, and at least search access (drwx--x--x) to your home directory.

The message that you send appears on the command line, and thus, can be read (for a short time), by the use of commands such as ps(1). If you want to send top secret or personal messages, you shouldn't be using electronic media!

HISTORY

to was inspired by (and is upwardly compatible with) a program written by Steve Riehm [Romulis]. Steve's version was based on one by Simon Burge [Snark].

For their inspiration, ideas and bug reports, thanks must go to: center; l l. Andrew Vanderstock <rxkajv@minyos.xx.rmit.oz.au> Craig Humphrey <Craig.Humphrey@comp.vuw.ac.nz> John DuBois <spcecdt@armory.com> Keith <basil@cs.odu.edu> Ken Weaverling <weave@pima.dtcc.edu> Marc Boschma <s861298@minyos.xx.rmit.oz.au> Steve Riehm <ln_smr@pki-nbg.philips.de> Willem Kasdorp <wkasdo@nikhefk.nikhef.nl>

AUTHOR

Luke Mewburn, <lm@rmit.edu.au>.

VERSION

This manual documents to version 3.3.3, 940421.