Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

write(1) [redhat man page]

WRITE(1)						     Linux Programmer's Manual							  WRITE(1)

NAME
write - send a message to another user SYNOPSIS
write user [ttyname] DESCRIPTION
Write allows you to communicate with other users, by copying lines from your terminal to theirs. When you run the write command, the user you are writing to gets a message of the form: Message from yourname@yourhost on yourtty at hh:mm ... Any further lines you enter will be copied to the specified user's terminal. If the other user wants to reply, they must run write as well. When you are done, type an end-of-file or interrupt character. The other user will see the message EOF indicating that the conversation is over. You can prevent people (other than the super-user) from writing to you with the mesg(1) command. Some commands, for example nroff(1) and pr(1), may disallow writing automatically, so that your output isn't overwritten. If the user you want to write to is logged in on more than one terminal, you can specify which terminal to write to by specifying the ter- minal name as the second operand to the write command. Alternatively, you can let write select one of the terminals - it will pick the one with the shortest idle time. This is so that if the user is logged in at work and also dialed up from home, the message will go to the right place. The traditional protocol for writing to someone is that the string `-o', either at the end of a line or on a line by itself, means that it's the other person's turn to talk. The string `oo' means that the person believes the conversation to be over. SEE ALSO
mesg(1), talk(1), who(1) HISTORY
A write command appeared in Version 6 AT&T UNIX. 12 March 1995 WRITE(1)

Check Out this Related Man Page

WRITE(1)						    BSD General Commands Manual 						  WRITE(1)

NAME
write -- send a message to another user SYNOPSIS
write user [ttyname] DESCRIPTION
The write utility allows you to communicate with other users, by copying lines from your terminal to theirs. When you run the write command, the user you are writing to gets a message of the form: Message from yourname@yourhost on yourtty at hh:mm ... Any further lines you enter will be copied to the specified user's terminal. If the other user wants to reply, they must run write as well. When you are done, type an end-of-file or interrupt character. The other user will see the message 'EOF' indicating that the conversation is over. You can prevent people (other than the super-user) from writing to you with the mesg(1) command. If the user you want to write to is logged in on more than one terminal, you can specify which terminal to write to by specifying the termi- nal name as the second operand to the write command. Alternatively, you can let write select one of the terminals - it will pick the one with the shortest idle time. This is so that if the user is logged in at work and also dialed up from home, the message will go to the right place. The traditional protocol for writing to someone is that the string '-o', either at the end of a line or on a line by itself, means that it's the other person's turn to talk. The string 'oo' means that the person believes the conversation to be over. SEE ALSO
mesg(1), talk(1), wall(1), who(1) HISTORY
A write command appeared in Version 1 AT&T UNIX. BSD
June 6, 1993 BSD
Man Page

14 More Discussions You Might Find Interesting

1. News, Links, Events and Announcements

UNIX.COM -- X/Open WIPO UDRP Complaint

FYI: http://arbiter.wipo.int/domains/cases/2002/d0200-0399.html unix.com unix.net unix.org ... all domains under siege by X/Open ... (17 Replies)
Discussion started by: Neo
17 Replies

2. UNIX for Dummies Questions & Answers

Using write & talk

I am new to Unix/Linux, and I have been experimenting with the write and talk commands. I guess I don't understand what I am doing (probably becuase I am thinking like a Windows user). When I have two computers on the same network and type something like talk tim where tim is the name of a... (3 Replies)
Discussion started by: ssbrady
3 Replies

3. UNIX for Dummies Questions & Answers

More on Write & Talk

Thanks for the comments, but I am still having problems. Certainly I did consult the man pages, but they didn't seem to help. So here is the scenario: Two computers are running Linux on a network, each assigned IP addresses & subnet masks from DHCP (NT Server). Both computers have a... (3 Replies)
Discussion started by: ssbrady
3 Replies

4. UNIX for Dummies Questions & Answers

Login Greetings

Does anyone know how to write a script to find out if a particular user is logged in to unix and send a greeting if they're logged in; otherwise, if they're not return a message they're not logged on. I'm still a beginner at this and I know you can use the 'who' command to find who's logged in... (3 Replies)
Discussion started by: Aiianah
3 Replies

5. What is on Your Mind?

I'm writing a new Linux program!

Yep, that's right. I'm writing a Linux binary that requires an X11 Server. It will also be released in a Shell, Win32, and Cocoa (Mac OS X). It's a program that's a text editor and more. It not just creates TXT and RTF files, it also can save in XML, RSS, and a whole lot of other formats. ... (11 Replies)
Discussion started by: Danny_10
11 Replies

6. What is on Your Mind?

Software engineers, real and otherwise

Hi. Rather than go off-topic in https://www.unix.com/unix-dummies-questions-answers/45122-comparison-2-files-unix-2.html#post302145451I I started this thread. In addition to continuing the discussion here, there are related threads on this topic at: How do you "get into" the programming... (4 Replies)
Discussion started by: drl
4 Replies

7. Programming

EOF checking the below

Hi, I am practicing exercise programs with System calls. Exercise Question: write a pogram to accept a filename from the user. The program should write ecery fifth byte of the file to the standard output. My Program : # include <stdio.h> # include <fcntl.h> # include <error.h> ... (10 Replies)
Discussion started by: ramkrix
10 Replies

8. UNIX for Dummies Questions & Answers

how to check the user input from terminal

Hello everybody!!! I am writing my own rm command in unix. I prompt the user to type if he wants to delete a file and then read what he typed. But how do i check what he typed? This is my program so far: echo 'Delete prog1.c (y/n)?' read yesOrNo if yesOrNo == 'y' then rm prog1.c... (6 Replies)
Discussion started by: mskart
6 Replies

9. Shell Programming and Scripting

How to 'write' to a user, lgged from 'su'?

I have a situation, where some script (running background) need to use the 'write' command and get a text to appeared on any screen of some particular user. Like:>echo "$message"|write user1 But I surprisingly realized, that if a person logged under any other name and after that uses the 'su'... (11 Replies)
Discussion started by: alex_5161
11 Replies

10. UNIX for Advanced & Expert Users

Problem while writing to a file...?

Hi, I have an issue with the file writing... It is, Suppose that if I am writing some data to a file... and at the same time another user has opened the file and want to write in to the file(writing to the file at the same time)...the another has to know that someone has opened the file, mean... (3 Replies)
Discussion started by: vijay4b7
3 Replies

11. Shell Programming and Scripting

Write a message on specific user terminal

Hi All, Need urgent help!!! Can anyone tellme how can we send a message on specific user terminal and get a response from user in return. Thanks in advance. (3 Replies)
Discussion started by: Sadhana
3 Replies

12. UNIX for Dummies Questions & Answers

copying less output with putty

I am attempting to copy long lines from "less" to notepad++ logged into remote system using putty but im having all sorts of problems. When i run "less filename" the lines wrap so when i copy and paste into notepad++ what should be a single line is showing as multiple lines. If i run less -S... (6 Replies)
Discussion started by: chronics
6 Replies

13. Programming

writing to file is not readable by user

In the following code segment I write to some file using , but this write is not readable by me when i open the file. any helps would be thankful. #include<stdio.h> #include<stdlib.h> #include<unistd.h> #include<sys/types.h> #include<sys/stat.h> #include<errno.h> #include<fcntl.h>... (6 Replies)
Discussion started by: saman_glorious
6 Replies

14. Programming

Passing argument to command in C

Hello all, New to C and I'm trying to write a program which can run a unix command. Would like to have the option of giving the user the ability to enter arguments e.g for "ls" be able to run "ls -l". I would appreciate any help. Thanks #include <stdio.h> #include <unistd.h> #include... (3 Replies)
Discussion started by: effizy
3 Replies