1

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

Edit:

 # 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

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.

frogstarr78
  • 994
  • 1
  • 6
  • 13

1 Answers1

3

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

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-.
jw013
  • 50,274
  • 9
  • 137
  • 141