Linux + 仅向特定用户发送墙消息

mai*_*ash 13 linux users

众所周知,我们可以向 Linux 机器上的所有用户发送广播消息。

但是如何仅向特定用户发送消息?

例如:

#who

rodegc  pts/1        2015-05-04 04:23 (10.4.72.1)
dwwar   pts/3        2015-05-03 00:56 (10.4.72.2)
tzcsar  pts/5        2015-05-03 22:32 (10.4.72.6)
.
.
.
.
.
Run Code Online (Sandbox Code Playgroud)

在这种情况下如何只向用户rodegc发送广播消息?

从手册页:

 WALL(1)                       Linux User's Manual                      WALL(1)

 NAME
 wall -- send a message to everybody?s terminal.

 SYNOPSIS
 wall [-n] [ message ]
Run Code Online (Sandbox Code Playgroud)

从手册页中,我看不到任何发送给特定用户的选项。

Sve*_*ven 24

write

write <user> 
Some text goes here
CTRL-D (eof)
Run Code Online (Sandbox Code Playgroud)

选择:

echo "Some text goes here" | write <user>
Run Code Online (Sandbox Code Playgroud)

man write