.\" $Revision: 1.9 $ .TH PRUNEHISTORY 8 .SH NAME prunehistory \- remove file names from Usenet history file .SH SYNOPSIS .B prunehistory [ .BI \-f " filename" ] [ .B \-p ] [ .I input ] .SH DESCRIPTION .I Prunehistory modifies the .IR history (5) text file to ``remove'' a set of filenames from it. The filenames are removed by overwriting them with spaces, so that the size and position of any following entries does not change. .PP .I Prunehistory reads the named .I input file, or standard input if no file is given. The input is taken as a set of lines. Blank lines and lines starting with a number sign (``#'') are ignored. All other lines are should consist of a Message-ID followed by zero or more filenames. .PP The Messge-ID is used as the .IR dbz (3) key to get an offset into the text file. If no filenames are mentioned on the input line, then all filenames in the text are ``removed.'' If any filenames are mentioned, they are converted into the history file notation. If they appear in the line for the specified Message-ID then they are removed. .PP Since .IR innd (8) only appends to the text file, .I prunehistory does not need to have any interaction with it. .SH OPTIONS .TP .B \-p .I Prunehistory will normally complain about lines that do not follow the correct format. If the ``\-p'' flag is used, then the program will silently print any invalid lines on its standard output. (Blank lines and comment lines are also passed through.) This can be useful when .I prunehistory is used as a filter for other programs such as .IR reap . .TP .B \-f The default name of the history file is .\" =()<.IR @<_PATH_HISTORY>@ ;>()= .IR /var/lib/news/history ; to specify a different name, use the ``\-f'' flag. .SH EXAMPLES .PP It is a good idea to delete purged entries and rebuild the .I dbz database every so often by using a script like the following: .PP .RS .nf ctlinnd throttle "Rebuilding history database" .\" =()@>()= cd /var/lib/news awk 'NF > 2 { printf "%s\et%s\et%s", $1, $2, $3; for (i = 4; i <= NF; i++) printf " %s", $i; print "\en"; }' history.n if makehistory \-r \-f history.n ; then mv history.n history mv history.n.pag history.pag mv history.n.dir history.dir else echo 'Problem rebuilding history; old file not replaced' f\&i ctlinnd go "Rebuilding history database" .fi .RE .PP Note that this keeps no record of expired articles. .SH HISTORY Written by Rich $alz for InterNetNews. .de R$ This is revision \\$3, dated \\$4. .. .R$ $Id: prunehistory.8,v 1.9 1996/10/29 23:25:05 brister Exp $ .SH "SEE ALSO" dbz(3), history(5), innd(8).