How can I delete all my mail in Linux Red Hat 7.2???


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How can I delete all my mail in Linux Red Hat 7.2???
# 1  
Old 04-09-2002
How can I delete all my mail in Linux Red Hat 7.2???

I have so many mails in my mailbox and I just cant delete each one individually. Is there a way to clear up every mail in my mail box without having to actually deal with each one separately????
# 2  
Old 04-09-2002
If you can access the /var/mail directory, you may be able to remove the file. Look for a file with your userID.

You could also create a script to read mail and delete it with a for or while loop (if you have an idea of how many messages { you can tell that via the header option in mail I believe}).
thehoghunter
# 3  
Old 04-09-2002
Even the very simplistic "mail" client should let you delete a batch of messages. Try issuing the command "mail" followed by the command "d 1-50"
to, for example, delete message #'s 1-50.
# 4  
Old 04-11-2002
I tried the d 1-50 on both Solaris and HP-UX and it did not work. What OS have you seen this work on?
thehoghunter
# 5  
Old 04-11-2002
I use the 'd 1-50' method on AIX to clean out a couple of generic user accounts, just be sure to 'quit' out of the mail program and not 'exit' otherwise the mails will not be deleted
# 6  
Old 04-11-2002
It wasn't that it worked and I exited - it didn't like the command

SUN:
? h
5 letters found in /var/mail/root, 0 scheduled for deletion, 0 newly arrived
> 5 2529 anyone@exchange.inThu Apr 11 05:00 EDT 2002 Thu Apr 11 05:00 EDT 2002
4 2330 Noone@exchanThu Mar 14 05:00 EST 2002 Thu Mar 14 05:00 EST 2002
3 3442 someone@exchange.inFri Mar 8 09:39 EST 2002 Fri Mar 8 09:39 EST 2002
2 2492 MAILER-DAEMON Fri Mar 8 06:18 EST 2002
1 2492 MAILER-DAEMON Fri Mar 8 06:18 EST 2002
? d 3-4
Illegal numeric

HP-UX:

? h
usage
q quit
x exit without changing mail
p print
s [file] save (default mbox)
w [file] same without header
- print previous
d delete
+ next (no delete)
m user mail to user
! cmd execute cmd
? d 1-3
From unixops Thu Apr 11 17:02:19 EDT 2002
Received: (from unixops@localhost)
by isaac.tampa.inmyworld.com (8.8.6 (PHNE_17190)/8.8.6) id RAA08371
for unixops; Thu, 11 Apr 2002 17:02:19 -0400 (EDT)
Date: Thu, 11 Apr 2002 17:02:19 -0400 (EDT)
From: Unix Admin <unixops>
Message-Id: <200204112102.RAA08371@isaac.tampa.inmyworld.com>
To: unixops
Subject: ignore test
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

this is a test file

?q

HP didn't give an error but didn't delete the mail either.
thehoghunter
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

How to download Red Hat Linux 7?

Pls help me where i can download linux 7 installations (7 Replies)
Discussion started by: ded325
7 Replies

2. Red Hat

Patches for Red Hat Linux

i am installing an application and i am getting this error message about patches Would you like to see system information? Operating System Information Name: Linux Architecture: i386 Version: 2.6.32-431.el6.x86_64 Required OS Patch Levels Passed Name ... (4 Replies)
Discussion started by: DOkuwa
4 Replies

3. Fedora

Which is the better platform to learn UNIX/Linux (Kali Linux Vs. Red Hat or other)?

I just started a new semester and I started my UNIX class yesterday. I've already decided to use python along with my learning process but what I really want to use with it is Kali as my UNIX/Linux platform to learn off of since I already wanted to learn Cyber Sec. anyways. I just wanted to know if... (12 Replies)
Discussion started by: ApacheOmega
12 Replies

4. UNIX for Dummies Questions & Answers

how to know if i use "Red Hat Enterprise Linux" or "Red Hat Desktop" ?

how to know if i use "Red Hat Enterprise Linux" or "Red Hat Desktop" ? (2 Replies)
Discussion started by: ahmedamer12
2 Replies

5. Red Hat

RAID on Red Hat Linux 7.2

Hi all I have an old Compaq DL380 (G1) server with 4 hard disks. It is running Red Hat Linux 7.2 One of the disks died. I didn't build the box myself. How would I determine if software RAID was configured? I had a look a /etc/fstab, but it's only referring to ida/c0d0 The... (3 Replies)
Discussion started by: soliberus
3 Replies

6. Linux

Red Hat Linux 9

Hello there! Will anybody please tell me some good links to online eBooks on Red Hat Linux 9 user experiences and the like. If the books are in PDF Format, it will be nice to read. Thanks for cooperation in advance. Enjoy using open source and breathe freely! JAM (5 Replies)
Discussion started by: Jawwad
5 Replies

7. UNIX for Dummies Questions & Answers

XP to Linux (Red Hat)

I have a PC running XP, and I have a PC that dual boots W2K and Red Hat Linux 7.3. I have the two connected via crossover cable, and the two can access each other when both are running windows. If I were to boot up Linux, can my XP PC telnet to the Linux PC? Any pointers or websites to... (3 Replies)
Discussion started by: lawadm1
3 Replies

8. UNIX for Dummies Questions & Answers

Slackware's Linux 3.0 VS Red Hat Linux 7.x

Hello guys, I got overzealous (I Think). I got the book Linux Unleashed that comes with the Slackware 3.0 Version of Linux for $2.00.I also have Red Hat Linux 7.2 (No book, just the OS).What I wanted to know was,other than the bells and whistles of Red Hat is there any significant difference... (2 Replies)
Discussion started by: perrylx
2 Replies

9. UNIX for Dummies Questions & Answers

Does Motif come with Linux Red Hat 7.2??

I want to know because am very interested in learning the basics or even the whole thing if it isn't too complicated. if it doesn't come with linux red hat, then, where can I get rich information about it?? (1 Reply)
Discussion started by: TRUEST
1 Replies

10. UNIX for Dummies Questions & Answers

Red Hat Linux 6.0

Ok here is my problem i do not know the command to load a driver for my network card in Ted hat linux 6.0 could sombody give me a hand. and if there is anyone that has a list of commands for red hat that would be great also (2 Replies)
Discussion started by: bbutler3295
2 Replies
Login or Register to Ask a Question