linux 中对外通信命令有:mail write wall talk mesg
1. mail --发送/接收邮件
a. 给系统或其他帐号发送邮件: mail 用户帐号
b. 收取邮件: mail
如: $ mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/spool/mail/magj": 3 messages 1 new 3 unread
U 1 Wed Aug 20 09:29 118/2820 "Returned mail: se"
U 2 Wed Aug 20 09:35 69/2521 "Returned mail: se"
>N 3 . Mon Aug 25 13:43 16/662 "Meeting"
&
U 表示已读
N 表示未读
c. 邮件箱 $ mail --读取用户系统邮箱
$ mail -f --读取用户个人邮箱
d. Mail Commands
t type messages
n goto and type next message
e edit messages
f give head lines of messages
d delete messages
s file append messages to file
u undelete messages
R reply to message senders
r reply to message senders and all recipients
pre make messages go back to /usr/spool/mail
m mail to specific users
q quit, saving unresolved messages in mbox
x quit, do not remove system mailbox
h print out active message headers
! shell escape
cd [directory] chdir to directory or home if none given
2. write --给某个在线的用户发送即时消息, 接收消息的用户必须在线
3. wall --向系统所有在线的用户发送广播消息
4. talk --向某个在线的用户发送聊天邀请, 退出邀请用Ctrl+C
5. mesg --设置充许/禁止别的用户发送消息给你, 包括:wall, write, talk等.root 和 daemon发送的即时消息, 这个设置不起作用.
如:
$ mesg
is y