Sponsored Content
Operating Systems Linux How can I search and delete mail? Post 302933666 by fabiogilr on Sunday 1st of February 2015 08:37:15 AM
Old 02-01-2015
How can I search and delete mail?

Hi,

I'd like to delete emails on one of my Linux boxes using a criteria and I don't really know where to start. Any suggestions?

The emails I'd like to delete have all the following sub-string: checkdefunct.sh.sh

I have more than 187.000 emails and 90% of them I'd like to get rid of.

Thank you,

Fabio

Last edited by rbatte1; 02-02-2015 at 08:00 AM..
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

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???? (5 Replies)
Discussion started by: IMPORTANT
5 Replies

2. Shell Programming and Scripting

Script to delete all mail in mailx

Hello all, Can some help me write a small script that when executed will delete all mail in mailx? I am having issues where /var is getting full often due to a lot of mail being stored, I would like to run a script on cron which would delete mail every 2 days, any help is much appreciated. (1 Reply)
Discussion started by: sqloyd
1 Replies

3. Shell Programming and Scripting

Delete all mails using mailx or mail

Hi , ?im a newbie using shell scripts. Is there any way to write a script that will delete all mails from my mailbox using mail or mailx command Thanks for your time E. Festas (2 Replies)
Discussion started by: ninjanesto
2 Replies

4. UNIX for Dummies Questions & Answers

Can I delete the file var/spool/mail/news?

The file var/spool/mail/news has grown very large and takes up too much space. Can I delete this without any problem? (3 Replies)
Discussion started by: dennisheazle
3 Replies

5. AIX

AIX auto delete old mail messages

We have had an issue where the mail file filled up. Is there a setting in sendmail.cf to automatically remove old emails? Say after 14 days. If not is there any way automatically to delete older mail files?? (1 Reply)
Discussion started by: daveisme
1 Replies

6. Shell Programming and Scripting

Search and delete

Gurus I have a CSV containing 60K records.Each row has 8 columns. On some rows ,for the 7th column ,i find word 'UnknownState(898914497)' repeated many times. e.g <N_HOST> <tcp> <*> <*> <*> <*> ... (1 Reply)
Discussion started by: ak835
1 Replies

7. Shell Programming and Scripting

Search and delete

A file(example viv.txt) contains a n number of rows like 1,2,3,4,5,6,7,8 11,22,33,44,55,66,77,88 1,3,9,7,8,5,2,6,4 Requirement: If number "5" exist in the sixth position then it should delete the whole line.like this it should check for all rows in a file(viv.txt) . please help on this. (5 Replies)
Discussion started by: katakamvivek
5 Replies

8. Shell Programming and Scripting

Move and later delete mail data of nonexistant users.

Hello everyone! i hope u can help me... i need a script that is able to do: When a user gets deleted in the ldap DB, the mail folder remains. How can i move to another location and delete it after a month? :wall: (2 Replies)
Discussion started by: newbreaker12
2 Replies

9. Solaris

How to delete all mail at once?

Hi guys, I have 459 mails sent to me by cron. I stopped the service and I will like to delete all the mail. Is there a command I can use to delete all my mail at once? Thanks guys (3 Replies)
Discussion started by: cjashu
3 Replies
asadmin-delete-domain(1AS)					   User Commands					asadmin-delete-domain(1AS)

NAME
asadmin-delete-domain, delete-domain - deletes the givendomain SYNOPSIS
delete-domain [--terse=false] [--echo=false] [--domaindir install_dir/domains] domain_name delete-domain deletes the specified domain. The domain must already exist and must be stopped. This command is supported in local mode only. OPTIONS
--domaindir directory where the domain is to be deleted. If specified, path must be accessible in the filesystem. If not speci- fied, the domain in the default install_dir/domains directory is deleted. --terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well- formatted data for consumption by a script. Default is false. --echo setting to true will echo the command line statement on the standard output. Default is false. OPERANDS
domain_name name of the domain. Must be a unique name. Example 1: Using delete-domain asadmin> delete-domain sampleDomain deleted domain sampleDomain successfully Where: the sampleDomain domain is deleted. EXIT STATUS
0 command executed successfully 1 error in executing the command asadmin-create-domain(1AS), asadmin-start-domain(1AS), asadmin-stop-domain(1AS), asadmin-list-domains(1AS) J2EE 1.4 SDK March 2004 asadmin-delete-domain(1AS)
All times are GMT -4. The time now is 12:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy