LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   old redhat linux email problems (https://www.linuxquestions.org/questions/linux-newbie-8/old-redhat-linux-email-problems-874622/)

magicman 04-12-2011 03:47 PM

old redhat linux email problems
 
My system is old. Not debian. My email looks like this:

/var/spool/
ls -l
total 19388
drwxr-xr-x 2 root mail 18837504 mqueue/


How do I clear out the mqueue directory? I don't want to delete it....just clear it out of the email that is clogging up my var partition. This old command doesn't seem to work anymore:

find /var/spool/mqueue -exec rm'{}' \;

Anybody know of the command to clear my mqueue?

Magicman

acid_kewpie 04-12-2011 03:52 PM

why does it matter that it's old? Or not debian?

That command will just delete all files in that directory, but won't work as is as there is no space between the rm and the following '{}'. What is the difference between "delete" and "clear out" here?? if that find command was working then just type it correctly and you'll be fine.

magicman 04-13-2011 04:43 PM

doesn't work
 
no matter how I write the command it just tells me that 'mqueue is a directory' and does not delete the files inside mqueue. find /var/spool/mqueue -exec rm '{}' \;

Any other ideas?

TobiSGD 04-13-2011 04:47 PM

If you just want to delete all files in /var/spool/mqueue (which is what your command actually does), why not just do a
Code:

rm /var/spool/mqueue/*
Or am I missing something?

magicman 04-14-2011 03:35 PM

still doesn't do what I need done
 
When I use the code:

rm /var/spool/mqueue/*

The screen asks if I want to delete (message 1)?
It asks that for each message. If I type 'y' as a reply, it goes to message 2 and asks the same question. If I answer y for all messages it only goes thru about 10 messages and stops. No differece is noted in the size of the mqueue directory.

TobiSGD 04-14-2011 03:39 PM

Try
Code:

rm -f /var/spool/mqueue
How do you measure the size of the directory? The correct way would be
Code:

du -sh /var/spool/mqueue


All times are GMT -5. The time now is 05:55 AM.