Wednesday, February 16, 2011

write command in linux

We can broadcast message through terminal using wall command, but, what if we want to send a message to a particular used through terminal.

We can use write command for this.

root@host# w
18:23:38 up 10 days, 10:03, 2 users, load average: 0.17, 0.02, 0.22
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 xx.xx.xx.xx 10:48 0.00s 0.02s 0.03s -ksh
diju pts/3 xx.xx.xx.xx Tue18 17:18m 0.00s 0.01s sshd: diju [priv]


root@host# write diju pts/3

Hello are you working on the mail server issue, I am asked to troubleshoot the same.

root@host#

After typing “write diju pts/3" as the command hit enter key once.
Then type the message and hit ctrl+d to exit from the write session


No comments: