Write (Unix)
Encyclopedia
write
can refer to several UnixUnix
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 TTYTty (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 thewrite
command is: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:Will show up to the user on that console as:
History
A version of the write command appeared in the First Edition of the Research UnixResearch 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 WindowsMicrosoft 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.