Mail-User-Agent

為什麼 list 命令在郵件中不起作用?

  • November 12, 2011

為什麼 list 命令在郵件中不起作用?

當我嘗試 l 或 list 時,它不起作用。它反而給了我一個有效命令的列表,包括列表。

Commands are:
next, alias, print, type, Type, Print, visual, top, touch, preserve, 
delete, dp, dt, undelete, unset, mail, mbox, more, page, More, Page, 
unread, U, !, 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, #, clobber

編輯:

# cat /etc/redhat-release 
CentOS release 5.5 (Final)


# mail --version
mail: invalid option -- -
Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ...
           [-- sendmail-options ...]
      mail [-iInNv] -f [name]
      mail [-iInNv] [-u user]

# $ rpm -qf $(which mail)
mailx-8.1.1-44.2.2

當然,無論哪個發行版,我都無法讓它工作。但我很高興知道如何在一個上做到這一點。

根據mail(1)手冊頁,list工作得很好:

list    (l) List the valid mail commands.

您正在尋找的可能是hz

headers
       (h) Lists the current windowful of headers.  To view the 
       next or previous group  of headers, see the z command.

z       mail presents message headers in windowfuls as described under 
       the headers command.  You can move mail's attention forward to
       the next window with the z command.  Also, you can move to the
       previous window by using z-.

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