歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux服務器 >> linux自帶的MAIL客戶端用法

linux自帶的MAIL客戶端用法

日期:2017/3/2 16:54:26   编辑:Linux服務器

mail命令進入系統自帶的MAIL

[root@mylinux ~]# mail

Mail version 8.1 6/6/93. Type ? for help.

"/var/spool/mail/root": 2 messages 2 new

>N 1 [email protected] Mon Dec 31 04:02 67/2018 "LogWatch for mylinux"

N 2 [email protected] Sun Jan 6 04:02 53/1689 "LogWatch for mylinux"

& help //進入幫助

Mail Commands

t type messages //程序調用more顯示消息,後接單個消息號或是一個范圍,如t 1 或者t 1-2

n goto and type next message //顯示下一條消息,常用

e edit messages //程序會調用vi編輯消息

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 //將郵件放回/usr/spool/mail,其實郵件本來就在這個目錄,但當你閱讀後,保存退出,郵件會轉移,並附加到/root/mbox這個文件裡

m mail to specific users //將郵件發給特定用戶

q quit, saving unresolved messages in mbox //退出,保存未處理的郵件

x quit, do not remove system mailbox //退出,不從/usr/spool/mail刪除已處理的郵件

h print out active message headers //顯示活動的郵件頭,常用

! shell escape //打印!

cd [directory] chdir to directory or home if none given //改變當前工作目錄

A consists of integers, ranges of same, or user names separated

by spaces. If omitted, Mail uses the last message typed.

郵件列表可以是以空格隔開的單個郵件,連續的郵件,或指定用戶的郵件,如果缺省,MAIL會使用最近顯示的郵件

A consists of user names or aliases separated by spaces.

Aliases are defined in .mailrc in your home directory.


用戶列表可以是以空格隔開的用戶名或別名.別名在主目錄的.mailrc文件裡定義

&

Copyright © Linux教程網 All Rights Reserved