Write (Unix)
Encyclopedia
write can refer to several Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 commands. All known variations of write are used to write messages to another user. The most popular variation sends a message directly to another user's TTY
Tty (Unix)
tty is a Unix command that prints to standard output the name of the terminal connected to standard input. The name of the program comes from teletypewriter, abbreviated "TTY".When the program runs, it will output something like this:$ tty/dev/pts/4...

.

Usage

The syntax for the write command is:


write user [tty]
message


The write session is terminated by sending EOF
End-of-file
In computing, end of file is a condition in a computer operating system where no more data can be read from a data source...

, which can be done by pressing Ctrl+D. The tty argument is only necessary when a user is logged into more than one terminal.

Example

A conversation initiated between two users on the same machine:


11:19 AM# write root pts/7
test


Will show up to the user on that console as:


Message from root@punch on pts/8 at 11:19 ...
test

History

A version of the write command appeared in the First Edition of the Research Unix
Research Unix
Research Unix is a term used to refer to versions of the Unix operating system for DEC PDP-7, PDP-11, VAX and Interdata 7/32 and 8/32 computers, developed in the Bell Labs Computing Science Research Center ....

 operating system. Another variation of write writes a message to a user on a Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 network, using the SMB
Server Message Block
In computer networking, Server Message Block , also known as Common Internet File System operates as an application-layer network protocol mainly used to provide shared access to files, printers, serial ports, and miscellaneous communications between nodes on a network. It also provides an...

 packet format.

Programmer's Workbench UNIX contained a program wall
Wall (Unix)
wall is a Unix command-line utility that displays the contents of a file or standard input to all logged-in users...

that wrote a message to all users in the same way.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK