Linux

什麼是“郵件”,它是如何導航的?

  • April 6, 2019

該程序位於/usr/bin/mail. 執行後,Version 8.1.2 01/15/2001顯示。

輸入list產生:

Commands are:
next, alias, print, type, Type, Print, visual, top, touch, preserve, 
delete, dp, dt, undelete, unset, mail, mbox, pipe, |, more, page, More, 
Page, unread, Unread, !, copy, chdir, cd, save, source, set, shell, 
version, group, write, from, file, folder, folders, ?, z, headers, 
help, =, Reply, Respond, reply, respond, edit, echo, quit, list, xit, 
exit, size, hold, if, else, endif, alternates, ignore, discard, retain, 
saveignore, savediscard, saveretain, core, #, inc, new

輸入?產生:

Mail Command               Description
-------------------------  --------------------------------------------
t [message list]           type message(s).
n                          goto and type next message.
e [message list]           edit message(s).
f [message list]           give head lines of messages.
d [message list]           delete message(s).
s [message list] <file>    append message(s) to file.
u [message list]           undelete message(s).
R [message list]           reply to message sender(s).
r [message list]           reply to message sender(s) and all recipients.
p [message list]           print message list.
pre [message list]         make messages go back to /var/mail.
m <recipient list>         mail to specific recipient(s).
q                          quit, saving unresolved messages in mbox.
x                          quit, do not remove system mailbox.
h                          print out active message headers.
!                          shell escape.
| [msglist] command        pipe message(s) to shell command.
pi [msglist] command       pipe message(s) to shell command.
cd [directory]             chdir to directory or home if none given
fi <file>                  switch to file (%=system inbox, %user=user's
                          system inbox).  + searches in your folder
                          directory for the file.
set variable[=value]       set Mail variable.

輸入z顯示消息列表的結尾 - 但該命令未顯示在?幫助頁面中。

  1. 這是什麼程序?
  2. 有它的使用教程嗎?
  3. 有哪些常用命令和有用的技巧?
  4. 如何導航(與 相反z)或刷新消息列表?

澄清:這個問題是關於互動式程序而不是腳本命令的 - 即在mail終端中輸入沒有標誌或參數的結果。

本頁詳細描述了互動式命令,實際上是一個相當詳盡的教程。描述命令,例如zz-

If there is more than a screenful of messages, then z will
show the next screenful, and z- will show the previous screenful.

mail不是松樹;只是mail。在一個完美的世界中,您的版本mail應該與POSIX/SUS 的mailx程序兼容(最相關的文件在“擴展描述”標題下),但是,像往常一樣,確定與完美的偏差留給讀者作為練習。

引用自:https://unix.stackexchange.com/questions/26790