Jump to content

Write (Unix): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Kidane (talk | contribs)
Expanded slightly, added syntax, removed stub notice ~~~~
Kidane (talk | contribs)
mNo edit summary
Line 5: Line 5:
==Usage==
==Usage==


The correct syntax for the <code>write</code> is:
The correct syntax for the <code>write</code> command is:


write ''user'' [''tty'']
write ''user'' [''tty'']

Revision as of 23:38, 31 January 2007


write can refer to several Unix 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

Usage

The correct syntax for the write command is:

write user [tty]
message

The write session is terminated by sending EOF, which can be done by pressing ctrl+c. 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 operating system. Another variation of write writes a message to a user on a Windows network, using the SMB packet format.

See also