I am movin my server and so I ended up doing the marvelous task of moving mail too.
And this way as I am very security conscious I realized I had over 3000 emails in the root user emailing from Cron for various tasks he had been performing.
Although I was aware of the cron system spam and had redirected all cron jobs to /dev/null , I never counted the set LOCALE bug of my xen server (read more here) .
This had result over 3000 mails in a year or so period from Cron user. And I wanted to delete them .But from where ? Thunderbird ? No.. And so ended up in the lovely bash field.
In fact the task was to delete all files that had the word Cron in them.
and so :
for i in `ls`;do if grep -q Cron $i ; then rm $i; fi;done
YabadabaDOO!
And this way as I am very security conscious I realized I had over 3000 emails in the root user emailing from Cron for various tasks he had been performing.
Although I was aware of the cron system spam and had redirected all cron jobs to /dev/null , I never counted the set LOCALE bug of my xen server (read more here) .
This had result over 3000 mails in a year or so period from Cron user. And I wanted to delete them .But from where ? Thunderbird ? No.. And so ended up in the lovely bash field.
In fact the task was to delete all files that had the word Cron in them.
and so :
for i in `ls`;do if grep -q Cron $i ; then rm $i; fi;done
YabadabaDOO!