Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

grephistory(1) [redhat man page]

GREPHISTORY(1)						      General Commands Manual						    GREPHISTORY(1)

NAME
grephistory - display file names from Usenet history file SYNOPSIS
grephistory [ -e ] [ -f filename ] [ -h ] [ -i ] [ -l ] [ -n ] [ -q ] [ -s ] [ -t ] [ messageid ] DESCRIPTION
Grephistory queries the dbz(3) index into the history(5) file for an article having a specified Message-ID or hash key of Message-ID. If messageid cannot be found in the database, the program prints ``Not found'' and exits with a non-zero status. If messageid is in the database, the program prints the token of the article and exits successfully. OPTIONS
-e If the ``-e'' flag is used, then grephistory will only print the filename of the token of an existing article. -f To specify a different value for the history file and database, use the ``-f'' flag. -h If the ``-h'' flag is used then the hash of the Message-ID will be printed regardless of its existense. -i If the ``-i'' flag is used, then grephistory will read a list of Message-ID's on standard input, one per line. Leading and trailing whitespace is ignored, as are any malformed lines. It will print on standard output those Message-ID's which are not found in the history database. This flag is used in processing ``ihave'' control messages. -l If the ``-l'' flag is used then the entire line from the history file will be displayed. -n If no pathname exists, the program will print ``/dev/null'' and exit successfully. This can happen when an article has been can- celed, or if it has been expired but its history is still retained. This is default behavior, which can be obtained by using the ``-n'' flag. -q If the ``-q'' flag is used, then no message is displayed. The program will still exit with the appropriate exit status. -s If the ``-s'' flag is used, then grephistory will read a similar list from its standard input. It will print on standard output a list of filenames for each article that is still available. This flag is used in processing ``sendme'' control messages. -t If the ``-t'' flag is used, then only the offset into the history text file is printed. HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 1.6.2.1, dated 2000/08/17. SEE ALSO
dbz(3), history(5), inn.conf(5). GREPHISTORY(1)

Check Out this Related Man Page

PRUNEHISTORY(8) 					      System Manager's Manual						   PRUNEHISTORY(8)

NAME
prunehistory - remove file names from Usenet history file SYNOPSIS
prunehistory [ -f filename ] [ -p ] [ input ] DESCRIPTION
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 size and position of any following entries does not change. 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 file- names. 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 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. Since innd(8) only appends to the text file, prunehistory does not need to have any interaction with it. OPTIONS
-p 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 prunehistory is used as a filter for other programs such as reap. -f The default name of the history file is /var/lib/news/history; to specify a different name, use the ``-f'' flag. EXAMPLES
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/lib/news awk 'NF > 2 { printf "%s %s %s", $1, $2, $3; for (i = 4; i <= NF; i++) printf " %s", $i; print " "; }' <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 else echo 'Problem rebuilding history; old file not replaced' fi ctlinnd go "Rebuilding history database" Note that this keeps no record of expired articles. HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 1.9, dated 1996/10/29. SEE ALSO
dbz(3), history(5), innd(8). PRUNEHISTORY(8)
Man Page