[TriLUG] Re: command line: delete all mail in a folder
Andrew Perrin
clists at perrin.socsci.unc.edu
Tue Sep 30 08:57:32 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
----------------------------------------------------------------------
Andrew J Perrin - http://www.unc.edu/~aperrin
Assistant Professor of Sociology, U of North Carolina, Chapel Hill
clists at perrin.socsci.unc.edu * andrew_perrin (at) unc.edu
More information about the TriLUG
mailing list