Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!cstreet!john From: john@cstreet.uu.net (John Poplett) Newsgroups: comp.unix.xenix Subject: Experimental man utility Keywords: man, utility Message-ID: <1990Jul6.061630.2268@cstreet.uu.net> Date: 6 Jul 90 06:16:30 GMT Reply-To: john@cstreet.UUCP (John Poplett) Organization: C Street Software @ uunet!cstreet Lines: 72 This is an experimental shell-script utility for maintenance of "catman" pages. It scans the "catman" directories, i.e. the directories containing formatted and expanded man pages, and removes files that have fallen into disuse. Manclean.sh is intended to be run periodically by cron. This version is wantonly biased toward Xenix though it would be easy enough to convert it for use with other man systems. Comments, suggestions for improvements, bug notices are invited. Please mail them to me directly. John ----snip-----------snip-----------snip-----------snip-----------snip---- #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh 'manclean.sh' <<'END_OF_FILE' X#!/bin/sh X# X# @(#)manclean.sh -- remove not-recently-used files from catman X# directories. Run from crontab a la uuclean, .etc. This version X# for Xenix systems. X# X# $Id: manclean.sh,v 1.2 90/07/05 23:00:35 john Exp Locker: john $ X# X if [ -f /etc/default/man ] then X . /etc/default/man fi X MANPATH=${MANPATH:=/usr/man} X cd $MANPATH X for directory in `find . -name 'cat*' -type d -print` do X cd $directory X for file in `find . -type f -atime +10 -print` X do X rm -f $file X done X cd .. done X du ${MANPATH} | mail -s "manclean ran; $MANPATH du" root X exit 0 END_OF_FILE if test 556 -ne `wc -c <'manclean.sh'`; then echo shar: \"'manclean.sh'\" unpacked with wrong size! fi # end of 'manclean.sh' fi echo shar: End of shell archive. exit 0 -- John Poplett @ C Street Software | "Shutup", he explained. 312 Wolff St. Oxnard, Ca. 93033 USA | ~ Ring Lardner (805) 486-7807 / uunet!cstreet!john |