Hi,
Is there a way to delete all the mails created by cron in /var/spool/.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
There may be, but I always do it by just logging in as the user
receiving the mail (usually root) at the command line and using the
‘mail’ command. You can press ‘d’ (delete) and then select all of the
messages you don’t want and they will be deleted. Messages are selected
by number and are space delimited so:
d 1 2 3 4 5 6 8 9 10
would delete the first ten messages.
Good luck.
mmarif4u wrote:
> Hi,
> Is there a way to delete all the mails created by cron in /var/spool/.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFI3Hci3s42bA80+9kRAisTAJ4sLvQeWGGumMqLXKzYZT7+7slNTQCeMYTH
GU0uRvf6HCwbmtjviRHZNIc=
=C0Ag
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Shoot… I forgot to mention that you get those automatically if any
data are sent to STDERR or (I think) STDOUT when your cron job runs so
if you want to prevent these mail messages entirely add the following to
the end of your command which has output:
>/dev/null 2>&1
Good luck.
ab@novell.com wrote:
> There may be, but I always do it by just logging in as the user
> receiving the mail (usually root) at the command line and using the
> ‘mail’ command. You can press ‘d’ (delete) and then select all of the
> messages you don’t want and they will be deleted. Messages are selected
> by number and are space delimited so:
>
> d 1 2 3 4 5 6 8 9 10
>
> would delete the first ten messages.
>
> Good luck.
>
>
>
>
>
> mmarif4u wrote:
>> Hi,
>> Is there a way to delete all the mails created by cron in /var/spool/.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFI3Hdc3s42bA80+9kRAkSTAJ0VWBDgTszwezBFkKNtsNY6jjMH+wCfWMdm
qZTrdrhfCnJGodPy7UbQO00=
=1Gkx
-----END PGP SIGNATURE-----
Thanks for the hints.
Actually the method ‘d’ is nice, but if you have 2750 messages, then its pain in the neck, to mention one by one to delete.
Abt the 2nd method to not receive mail.thanks for that.
Hope somebody have idea, that how to delete all existing messages in a one shoot.
d *
You can also delete a range:
d 1-10