安装命令`list`

安装命令`list`

默认情况下,listUbuntu Gnome 16.10 上未安装该命令。有人能告诉我如何安装此命令吗?

list命令与命令相关mail,可以使用 安装sudo apt install mailutils。在NDG课程中,我得到了以下图片:

在此处输入图片描述

答案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

相关内容