prunehistory man page on 4.4BSD

Printed from


       prunehistory - remove file names from Usenet history file

       prunehistory [ -f filename ] [ -p ] [ input ]

       Prunehistory  modifies  the history(5) text file to ``remove'' a set of
       filenames from it.  The filenames are removed by overwriting them  with
       spaces, so that the fize and position of any following entries does not

       Prunehistory reads the named 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.
       Prunehistory will normally complain about lines that do not follow this
       format.	 If  the  ``-p''  flag is used, then the program will silently
       print any invalid lines on its standard output.	(Blank lines and  com‐
       ment lines are also passed through.)  This can be useful when prunehis‐
       tory is used as a filter for other programs such as reap.

       The Messge-ID is used as the dbz(3) key to get an offset into the  text
       file.   If no filenames are mentioned on the input line, then all file‐
       names 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.

       The default name of the history file  is	 /var/spool/news/data/history;
       to specify a different name, use the ``-f'' flag.

       Since innd(8) only appends to the text file, prunehistory does not need
       to have any interaction with it.

       It is a good idea to delete purged entries and rebuild the dbz database
       every so often by using a script like the following:
	      ctlinnd throttle "Rebuilding history database"
	      cd /var/spool/news/data
	      awk 'NF > 2 {
		   printf "%s\t%s\t%s", $1, $2, $3;
		   for (i = 4; i <= NF; i++)
			printf " %s", $i;
		   print "\n";
	      }' <history >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
		  echo 'Problem rebuilding history; old file not replaced'
	      ctlinnd go "Rebuilding history database"
       Note that this keeps no record of expired articles.

       Written	by  Rich  $alz <> for InterNetNews.  This is
       revision 1.6, dated 1993/01/29.

       dbz(3), history(5), innd(8).


List of man pages available for 4.4BSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net