gaspar@ALMSA-1.ARPA (Al Gaspar) (11/30/88)
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? How? I can do it at the shell of course, but it seems so inelegant :-). Cheers-- Al -- Al Gaspar <gaspar@almsa-1.arpa> USAMC CSDA, ATTN: AMXAL-OW, Box 1578, St. Louis, MO 63188-1578 COMMERCIAL: (314) 263-5118 AUTOVON: 693-5118 uunet.uu.net!almsa-1.arpa!gaspar
jerryp@PACRAT.NPAC.SYR.EDU (Jerry Peek) (12/02/88)
> 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 Once a day (at 3:45 AM) it searches the filesystem for files whose name starts with "#" or "," and which haven't been read or written in 7 days. It removes those files. --Jerry Peek, Northeast Parallel Architectures Center, Syracuse, NY jerryp@cmx.npac.syr.edu +1 315 443-1722
khera@romeo.cs.duke.edu (Vick Khera) (12/04/88)
In article <8812011831.aa18248@ICS.UCI.EDU> gaspar@ALMSA-1.ARPA (Al Gaspar) 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? How? I can do it >at the shell of course, but it seems so inelegant :-). > ... >Al Gaspar <gaspar@almsa-1.arpa> In my installation of mh, deleted and refiled messages are renamed to have a comma ``,'' before them. i take care of these files with my .logout file. comma-files that have not been modified in two or more days are deleted. ----<cut here>---- if ( "$HOST" == "romeo" ) then find `mhpath +` -name ,\* -mtime +2 -exec rm -f \{\} \; & endif clear echo Goodbye ----<cut here>---- v. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ARPA: khera@cs.duke.edu Department of Computer Science CSNET: khera@duke Duke University UUCP: decvax!duke!khera Durham, NC 27706
tr@wind.bellcore.com (tom reingold) (12/04/88)
Vick Khera offers a ".logout" file to remove files from mh directories that are more than two days old and whose names begin with a comma. But omitted from the ".logout" file was the most essential ingredient: the command "/usr/games/fortune". Logging out without my fortune would be like breakfast without Anita Bryant. Tom Reingold PAPERNET: |INTERNET: tr@bellcore.bellcore.com Bell Communications Research |UUCP-NET: bellcore!tr 445 South St room 2L350 |SOUNDNET: (201) 829-4622 [work], Morristown, NJ 07960-1910 | (201) 287-2345 [home]
brian@apollo.COM (Brian Holt) (12/07/88)
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.)
ehrhart@aai8.uucp (Tim Ehrhart) (12/11/88)
In article <8812011831.aa18248@ICS.UCI.EDU> gaspar@ALMSA-1.ARPA (Al Gaspar) 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? How? I can do it >at the shell of course, but it seems so inelegant :-). I use an approach that kind of 'nips it in the bud'. I use my .mh_profile to use /bin/rm as my rmmproc. This doesn't allow for accidental errors, but doesn't one other cleanup machanisms. Here is the line from my .mh_profile: rmmproc: /bin/rm Tim Ehrhart SRI International ehrhart@spam.istc.sri.com
ault@PAWL.RPI.EDU (James Ault) (12/30/88)
> > 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 > Once a day (at 3:45 AM) it searches the filesystem for files whose name > starts with "#" or "," and which haven't been read or written in 7 days. > It removes those files. > --Jerry Peek, Northeast Parallel Architectures Center, Syracuse, NY > jerryp@cmx.npac.syr.edu These files can be removed by MH if you specify it in your .mh_profile: rmmproc: /bin/rm I believe this will replace the default of /bin/mv. --Jim Ault, Postmaster, Rensselaer Polytechnic Institute, Troy, NY ault@itsgw.rpi.edu ault@rpitsgw.BITNET
jerryp@PacRat.NPAC.syr.EDU (Jerry Peek) (12/30/88)
> > > 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)... > > Once a day (at 3:45 AM) it searches the filesystem for files whose name > > starts with "#" or "," and which haven't been read or written in 7 days. > > It removes those files. > These files can be removed by MH if you specify it in your .mh_profile: > rmmproc: /bin/rm The advantage of the pound-sign setup is that people who accidentally remove messages can change their minds for a week or so and "un-rmm" them by taking off the #. There are shell scripts that do this--or you can just use "mv". Of course, there's a tradeoff: using /bin/rm right away saves disk space. --Jerry Peek, Northeast Parallel Architectures Center, Syracuse, NY jerryp@cmx.npac.syr.edu +1 315 443-1722