|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
These are some of the mail command:
Usage: ? print this help message # display message number # - print previous + next (no delete) ! cmd execute cmd <CR> next (no delete) a position at and read newly arrived mail d [#] delete message # (default current message) dp delete current message and print the next dq delete current message and exit h a display all headers h d display headers of letters scheduled for deletion h [#] display headers around # (default current message) m user mail (and delete) current message to user n next (no delete) p print (override any warnings of binary content) P override default 'brief' mode and display ALL header lines q, ^D quit r [args] reply to (and delete) current letter via mail [args] s [files] save (and delete) current message (default mbox) u [#] undelete message # (default current message) w [files] save (and delete) current message without header x exit without changing mail y [files] save (and delete) current message (default mbox) Is there 1 command to delete all your email? THANKS! |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
deleting mail in Unix
type mail d * will remove all mail d 1 3 deletes the 1st and 3rd messages d 1-3 deletes messages 1 through 3 d * deletes all your messages d deletes the current message |
| The Following User Says Thank You to yamiear For This Useful Post: | ||
ngaisteve1 (08-12-2010) | ||
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
type in mail
then ? d * Illegal numeric ? or ? d 1-3 Illegal numeric ? These are messages that I got!!! Please let me know what is wrong! |
|
#4
|
|||
|
|||
|
Not sure
Works on AIX 5.2 Mail [5.2 UCB] [AIX 5.X] Type ? for help. "/var/spool/mail/maestro": 2 messages 2 new >N 1 MAILER-DAEMON Tue Jul 11 20:29 83/2771 "Warning: could not send mess" N 2 MAILER-DAEMON Wed Jul 12 00:29 83/2773 "Warning: could not send mess" ? d * ? quit (maestro@)/usr/local/tivoli/maestro>mail No mail for maestro |
| Sponsored Links | |
|
|
#5
|
||||
|
||||
|
I think that deleting all messages can be done by truncating the /var/mail/<userid> files as well. But not sure if that will have any unwanted side effects.
|
| Sponsored Links | |
|
|
#6
|
||||
|
||||
|
It can be done by truncating the mail spool for the user if you have mailx try delete * Code:
#! /usr/bin/ksh
#
# delete_mails.ksh
#
#
# You may want a confirmation dialog here, delete can't be reversed.
#
MAIL=$(mail << EOF | sed -n 's/^[> ][ ]*\([0-9][0-9]*\)[ ][ ]*.*/\1/p'
h a
EOF
)
mail |&
for mail in $MAIL; do
print -p d $mail
print q
sleep 1
exit 0** note do not just copy and paste the code. each Code:
[ ] is a [ followed by a space and a tab followed by a ]. Last edited by reborg; 06-12-2007 at 04:51 AM.. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 1000s of undelivered email messages | timgolding | Security | 1 | 10-29-2010 03:14 PM |
| Delete email recd | suismilyadon | Solaris | 2 | 09-24-2009 04:15 AM |
| How to delete old email addresses? | Deede | UNIX for Dummies Questions & Answers | 1 | 02-03-2004 03:25 PM |
| How to delete email addresses | Deede | Programming | 4 | 02-02-2004 06:23 PM |
| Delete All email | foothillnet | UNIX for Dummies Questions & Answers | 2 | 07-21-2003 03:48 PM |
|
|