home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2 / Openstep-4.2-Intel-User.iso / NextLibrary / PrivateFrameworks / Uucp.framework / Versions / A / Resources / contrib / uuclean < prev    next >
Text File  |  1995-05-27  |  1KB  |  26 lines

  1. # This is a sample uuclean shell script
  2. # Copyright (C) 1992 Ian Lance Taylor
  3. # Do whatever you like with this script.
  4. #
  5. # Set some variables
  6. bindir=/usr/local/bin
  7. spooldir=/usr/spool/uucp
  8. #
  9. # Warn about all mail over two days old
  10. $(bindir)/uustat -c rmail -o 48 -N -Q -W"Unable to deliver; will try up to one week"
  11. # Return all mail over a week old
  12. $(bindir)/uustat -c rmail -o 168 -K -M -N -Q -W"Could not be delivered for over one week"
  13. # Throw away other requests over a week old
  14. $(bindir)/uustat -o 168 -K -M -N -Q -W"Over one week old"
  15. # Throw away any executions over three days old
  16. $(bindir)/uustat -o 72 -M -N -Q -W"Unable to execute for three days"
  17. #
  18. # Now delete any old spool files
  19. find $(spooldir) -ctime +8 -name '[CDX].*' -print -exec rm -f \{\} \;
  20. # Delete any old temporary files
  21. find $(spooldir) -atime +1 -ctime +1 -name 'TM.*' -print -exec rm -f \{\} \;
  22. # Delete any old preserved files
  23. find $(spooldir)/.Preserve -atime +14 -ctime +14 -print -exec rm -f \{\} \;
  24. # Delete any old failed execution files
  25. find $(spooldir)/.Failed -atime +14 -ctime +14 -print -exec rm -f \{\} \;
  26.