If you are struggling with millions of SPAM messages like me, you should rather use “find” instead of “rm” while deleting files in a folder. This method is tested to be faster than rm -rf:
switch to the folder containing files, in my case:
cd /var/spool/exim/
ans start deleting files by typing:
find . -maxdepth 1 -type f -delete
you can track the number of remaining files easily by tiping the below command from another terminal: (cd to same directory)
find . -maxdepth 1 -type f | wc -l
..