InnerhalbNach weiteren Dokumenten suchenSupport-Ressourcen | Dieses Buch im PDF-Format herunterladen (5093 KB)
write(1)NAME | SYNOPSIS | DESCRIPTION | OPERANDS | ENVIRONMENT VARIABLES | EXIT STATUS | FILES | ATTRIBUTES | SEE ALSO | DIAGNOSTICS NAME
SYNOPSIS
DESCRIPTION
The write utility reads lines from the user's standard input and writes them to the terminal of another user. When first invoked, it writes the message:
to user. When it has successfully completed the connection, the sender's terminal will be alerted twice to indicate that what the sender is typing is being written to the recipient's terminal. If the recipient wants to reply, this can be accomplished by typing
upon receipt of the initial message. Whenever a line of input as delimited by a NL, EOF, or EOL special character is accumulated while in canonical input mode, the accumulated data will be written on the other user's terminal. Characters are processed as follows: To write to a user who is logged in more than once, the terminal argument can be used to indicate which terminal to write to. Otherwise, the recipient's terminal is the first writable instance of the user found in /usr/adm/utmpx, and the following informational message will be written to the sender's standard output, indicating which terminal was chosen:
Permission to be a recipient of a write message can be denied or granted by use of the mesg utility. However, a user's privilege may further constrain the domain of accessibility of other users' terminals. The write utility will fail when the user lacks the appropriate privileges to perform the requested action. 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. write runs setgid() (see setuid(2)) to the group ID tty, in order to have write permissions on other user's terminals. The following protocol is suggested for using write: 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 (that is, (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. OPERANDS
The following operands are supported: ENVIRONMENT VARIABLESSee environ(5) for descriptions of the following environment variables that affect the execution of write: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and NLSPATH. EXIT STATUS
The following exit values are returned: FILESATTRIBUTESSee attributes(5) for descriptions of the following attributes:
SEE ALSOmail(1), mesg(1), pr(1), sh(1), talk(1), who(1), setuid (2), termios(3C), attributes(5), environ(5), standards(5) DIAGNOSTICS
NAME | SYNOPSIS | DESCRIPTION | OPERANDS | ENVIRONMENT VARIABLES | EXIT STATUS | FILES | ATTRIBUTES | SEE ALSO | DIAGNOSTICS |
|||||||||||