[TriLUG] Re: command line: delete all mail in a folder

Frye, Matthew Matthew.Frye at rexhealth.com
Tue Sep 30 11:15:21 EDT 2003


> On Tue, 30 Sep 2003, James Manning wrote:
> 
> > > Ive considered just deleting the entire file and using touch
> > > to recreate an empty mbox folder, but there must be a more elegant
> > > and safe way.
> >
> > I'm sure there's better routes, but this is what I have for a daily
> > cron job - answer to the orig. question being "cp /dev/null foo"
> >
> > [snip]
> >     cp /dev/null $SPAM_MBOX
> 
> I'd be more likely to simply:
> 
> echo "" > $SPAM_MBOX
> 
> 
Simpler yet: 

	root at feynman
	/root> >foo

Matt



More information about the TriLUG mailing list