prunehistory.8

来自「早期freebsd实现」· 8 代码 · 共 98 行

8
98
字号
.\" $Revision: 1.6 $.TH PRUNEHISTORY 8.SH NAMEprunehistory \- remove file names from Usenet history file.SH SYNOPSIS.B prunehistory[.BI \-f " filename"][.B \-p][.I input].SH DESCRIPTION.I Prunehistorymodifies 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 thefize and position of any following entries does not change..PP.I Prunehistoryreads the named.I inputfile, 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 ormore filenames..I Prunehistorywill normally complain about lines that do not follow this format.If the ``\-p'' flag is used, then the program will silently print anyinvalid lines on its standard output.(Blank lines and comment lines are also passed through.)This can be useful when.I prunehistoryis used as a filter for other programs such as.IR reap ..PPThe 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 inthe text are ``removed.''If any filenames are mentioned, they are converted into the history filenotation.If they appear in the line for the specified Message-ID then they are removed..PPThe default name of the history file is.\" =()<.IR @<_PATH_HISTORY>@ ;>()=.IR /var/spool/news/data/history ;to specify a different name, use the ``\-f'' flag..PPSince.IR innd (8)only appendsto the text file,.I prunehistorydoes not need to have any interaction with it..PPIt is a good idea to delete purged entries and rebuild the.I dbzdatabase every so often by using a script like the following:.RS.nfctlinnd throttle "Rebuilding history database".\" =()<cd @<_PATH_NEWSLIB>@>()=cd /var/spool/news/dataawk 'NF > 2 {	printf "%s\et%s\et%s", $1, $2, $3;	for (i = 4; i <= NF; i++)		printf " %s", $i;	print "\en";}' <history >history.nif makehistory \-r \-f history.n ; then    mv history.n history    mv history.n.pag history.pag    mv history.n.dir history.direlse    echo 'Problem rebuilding history; old file not replaced'f\&ictlinnd go "Rebuilding history database".fi.RENote that this keeps no record of expired articles..SH HISTORYWritten by Rich $alz <rsalz@uunet.uu.net> for InterNetNews..de R$This is revision \\$3, dated \\$4....R$ $Id: prunehistory.8,v 1.6 1993/01/29 16:43:12 rsalz Exp $.SH "SEE ALSO"dbz(3),history(5),innd(8).

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?