View Full Version : Clearing mailbox via ssh ?

09-13-2004, 08:14 PM
Hi, would like to know if there's any nifty command to clear my Mailbox that has 2K emails which I want to clear oneshot. Thanks in advance.

09-14-2004, 01:39 AM
'rm /var/spool/mail/username'

09-14-2004, 02:18 AM
just to make sure, it wont totally remove the entire folder but just the emails right ? - thanks

09-14-2004, 07:08 AM
That one I think I know the answer to... :) I have removed those files via FTP in the past and it simply removes the email not a folder. Those are the files the emails are in. If you look at them after you check mail the files are there but blank. It doesn't seem to hurt anything to actually remove the file. Guess sendmail just recreates it if it is not there.