Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ulowell!apollo!brian From: brian@apollo.COM (Brian Holt) Newsgroups: comp.mail.mh Subject: Re: # signs in inbox Message-ID: <40188493.18e92@apollo.COM> Date: 6 Dec 88 16:30:00 GMT References:<8812011831.aa18248@ICS.UCI.EDU> <8812021334.AA04237@PacRat.NPAC.syr.edu> Reply-To: brian@apollo.COM (Brian Holt) Organization: Apollo Computer, Chelmsford, MA Lines: 51 In article <8812021334.AA04237@PacRat.NPAC.syr.edu> jerryp@PACRAT.NPAC.SYR.EDU (Jerry Peek) writes: >> I notice that when I refile items from my inbox the orignal messages >> are stored in files with the same number but with a '#' sign in >> the first position. Are these removed by mh? > >On systems I know of, they're removed by cron(8), with a line in the crontab >file. The line looks something like this: > > 45 3 * * * find / -name "[,#]*" -type f -atime +7 -print | xargs rm -f > I have the following script, which I call 'purge'. Share and enjoy, =brian #!/bin/sh # # purge - Purges deleted mh messages # # Usage: purge Removes deleted messages in the current folder # purge +folder Removes deleted messages in specified folder # PATH=/usr/new/mh:$PATH:/bin curfolder=`folder -fast` folderpath=`mhpath $1` # Uncomment the following line if you want purge to change your current folder #newfolder=`folder -fast $1` echo "Purging deleted messages in $folderpath:" cd $folderpath deleted=`ls \#* 2>/dev/null` if [ -n "$deleted" ] then ls \#* rm $deleted else echo "No deleted messages" fi #echo "Remaining messages:" #scan $1 folder +$curfolder -fast > /dev/null -- Internet: brian@apollo.COM UUCP: {decvax,mit-erl,yale}!apollo!brian NETel: Apollo: 508-256-6600 x5694 Home: 617-332-3073 USPS: Apollo Computer, Chelmsford MA Home: 29 Trowbridge St. Newton MA (Copyright 1988 by author. All rights reserved. Free redistribution allowed.)