Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
1  
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
add comment

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

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-.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.