答案1
您正在寻找的命令list
不是 shell 命令,而是mail
程序内部的命令。因此,您需要先mail
在 shell 中运行该命令才能运行该mail
程序,然后才能使用它的list
命令:
firas@wakaba ~ % mail
Mail version 8.1.2 01/15/2001. Type ? for help.
"/var/mail/firas": 1 message 1 unread
>U 1 firas@wakaba Mon Nov 28 09:41 15/396 Test
& 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, #, inc, new
& quit
Held 1 message in /var/mail/firas
如果mail
只是回答“没有邮件”,你可以先给自己发一封邮件:
firas@wakaba ~ % mail
No mail for firas
firas@wakaba ~ % echo "Test." | mail -s Test firas
firas@wakaba ~ % mail
Mail version 8.1.2 01/15/2001. Type ? for help.
"/var/mail/firas": 1 message 1 new
>N 1 firas@wakaba Mon Nov 28 09:42 14/386 Test
& 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, #, inc, new
& quit
Held 1 message in /var/mail/firas