Enter mail in Linux and enter your inbox.
D
Deletes the current message, and moves the pointer down.
D 3
Delete the message with the number 3.
D 1-100
Deletes the number 1th to 100th message.
When you exit, be aware that you must use the Q command to save the previous operation.
Q
Quit Mail command platform, save previous operations, such as deleting messages that have been deleted with D, and the read messages will be transferred to the mbox file in the current user's home directory. If you delete a file in mbox, it will be deleted completely.
X
Quit the Mail command platform and do not save previous actions, such as deleting messages
================================ Below is an example =====================================
$ mail
Mail [5.2 UCB] [AIX 5.X] Type? For help.
"/var/spool/mail/oracle": Messages Unread
>u 1 daemon Sun 16:22 32/953 "Output from cron job/home/o"
U 2 daemon Mon 00:00 32/953 "Output from cron job/home/o"
U 3 daemon Tue Feb 1 00:00 32/951 "Output from cron job/home/o"
U 4 daemon Wed Feb 2 00:00 32/951 "Output from cron job/home/o"
U 5 Daemon Thu Feb 3 00:00 32/951 "Output from cron job/home/o"
U 6 daemon Fri Feb 4 00:00 32/951 "Output from cron job/home/o"
U 7 Daemon Sat Feb 5 00:00 32/951 "Output from cron job/home/o"
U 8 Daemon Sun Feb 6 00:00 32/951 "Output from cron job/home/o"
U 9 Daemon Mon Feb 7 00:00 32/951 "Output from cron job/home/o"
U Daemon Tue Feb 8 00:00 32/951 "Output from cron job/home/o"
U One daemon Wed Feb 9 00:00 32/951 "Output from cron job/home/o"
U Daemon Thu Feb 00:00 32/953 "Output from cron job/home/o"
U Daemon Fri Feb 00:00 32/953 "Output from cron job/home/o"
U Daemon Sat Feb 00:00 32/953 "Output from cron job/home/o"
U Daemon Sun Feb 00:00 32/953 "Output from cron job/home/o"
U Daemon Mon Feb 00:00 32/953 "Output from cron job/home/o"
U Daemon Tue Feb 00:00 32/953 "Output from cron job/home/o"
U Daemon Wed Feb 00:00 32/953 "Output from cron job/home/o"
U Daemon Thu Feb 00:00 32/953 "Output from cron job/home/o"
U Daemon Fri Feb 00:00 32/953 "Output from cron job/home/o"
U Daemon Sat Feb 00:00 32/953 "Output from cron job/home/o"
U Daemon Sun Feb 00:00 32/953 "Output from cron job/home/o"
U Daemon Mon Feb 00:00 32/953 "Output from cron job/home/o"
U-Daemon Tue Feb 00:00 32/953 "Output from cron job/home/o"
U Daemon Wed Feb 00:00 32/953 "Output from cron job/home/o"
U-Daemon Thu Feb 00:00 32/953 "Output from cron job/home/o"
U Daemon Fri Feb 00:00 32/953 "Output from cron job/home/o"
U-Daemon Sat Feb 00:00 32/953 "Output from cron job/home/o"
U Daemon Sun Feb 00:00 32/953 "Output from cron job/home/o"
U Daemon Mon Feb 00:00 32/953 "Output from cron job/home/o"
U-Daemon Tue Mar 1 00:00 32/951 "Output from cron job/home/o"
U Daemon Wed Mar 2 00:00 32/951 "Output from cron job/home/o"
U-Daemon Thu Mar 3 00:00 32/951 "Output from cron job/home/o"
U-Daemon Fri Mar 4 00:00 32/951 "Output from cron job/home/o"
U Daemon Sat Mar 5 00:00 32/953 "Output from cron job/home/o"
U Daemon Sun Mar 6 00:00 32/951 "Output from cron job/home/o"
U-Daemon Mon Mar 7 00:00 32/951 "Output from cron job/home/o"
U Daemon Tue Mar 8 00:00 32/951 "Output from cron job/home/o"
? D 1-38
? Q
$ df-g