Take the 2-minute tour ×

Why doesn't the list command work in mail?

When I try l or list, it doesn't work. It instead gives me a list of the valid commands, including 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)

Granted, I've NEVER been able to get this to work regardless of which distro. But I'll be happy to know how to do it on just one.

share|improve this question
There are several mail commands. Which one do you have? Try mail --version, or the first line that appears when you start mail, or ask your distribution (e.g. dpkg -S $(which mail) or rpm -qf $(which mail). –  Gilles Nov 12 '11 at 19:48
der.. no version info. sorry –  frogstarr78 Nov 12 '11 at 23:58

1 Answer 1

up vote 3 down vote accepted

According to the mail(1) man page, list is working just fine:

list    (l) List the valid mail commands.

What you are looking for is probably h or z

        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
        previous window by using z-.
share|improve this answer

Your Answer


