.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "GREPHISTORY 1" .TH GREPHISTORY 1 2024-04-01 "INN 2.7.2" "InterNetNews Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME grephistory \- Query the INN history database .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fBgrephistory\fR [\fB\-eilnqsv\fR] [\fB\-f\fR \fIdb\fR] [\fImessage-id\fR] .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBgrephistory\fR queries the INN history database for information about the specified message-ID. If no flags are given, the program prints the storage API token of the corresponding article, or \f(CW\*(C`/dev/null\*(C'\fR if the article is listed in the history database but not stored on the server. If the message-ID cannot be found in the database, \fBgrephistory\fR will print \f(CW\*(C`grephistory: not found\*(C'\fR and exit with a non-zero status. .PP Be sure to escape any special characters in the message ID from the shell. Single quotes are recommended for this purpose since many message-IDs contain dollar signs. .SH OPTIONS .IX Header "OPTIONS" .IP \fB\-e\fR 4 .IX Item "-e" Only print the storage token if the article is stored on the system. (In other words, suppress the \f(CW\*(C`/dev/null\*(C'\fR or \f(CW\*(C`not found\*(C'\fR output for missing or remembered articles.) .IP "\fB\-f\fR \fIdb\fR" 4 .IX Item "-f db" Query the history database \fIdb\fR rather than the default history database. .IP \fB\-i\fR 4 .IX Item "-i" Rather than expecting a message-ID on the command line, \fBgrephistory\fR will read a list of message-IDs 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-IDs which are not found in the history database. This is used when processing \f(CW\*(C`ihave\*(C'\fR control messages. .IP \fB\-l\fR 4 .IX Item "-l" Display the entire line from the history database, rather than just the storage API token. If the message-ID is present in the history database but has no storage API token, \fBgrephistory\fR does not print anything. .IP \fB\-n\fR 4 .IX Item "-n" If the message-ID is present in the history database but has no storage API token, print \f(CW\*(C`/dev/null\*(C'\fR and exit successfully. This can happen if an article has been cancelled or expired, but history information has still been retained. This is the default behavior. .IP \fB\-q\fR 4 .IX Item "-q" Don't print any message, but still exit with the appropriate status. .IP \fB\-s\fR 4 .IX Item "-s" Rather than expecting a message-ID on the command line, \fBgrephistory\fR will read a list of message-IDs on standard input, one per line. Leading and trailing whitespace is ignored, as are any malformed lines. It will print on standard output the storage API tokens for any articles that are still available, one per line. This flag is used when processing \&\f(CW\*(C`sendme\*(C'\fR control messages. .IP \fB\-v\fR 4 .IX Item "-v" Print out the hash of the message-ID for diagnostic purposes, as well as any other requested information. This flag is not useful with \fB\-i\fR or \&\fB\-s\fR. .SH EXAMPLES .IX Header "EXAMPLES" In case the requested article is not listed in the history database: .PP .Vb 4 \& % grephistory \*(Aq\*(Aq \& grephistory: not found \& % grephistory \-v \*(Aq\*(Aq \& grephistory: not found (hash is 501C66C22932BA91131186D7218201EB) .Ve .PP In case the requested article is listed in the history database but not stored on the server: .PP .Vb 2 \& % grephistory \*(Aq\*(Aq \& /dev/null .Ve .PP In case the requested article is stored on the server: .PP .Vb 5 \& % grephistory \*(Aq<87fxeaay1z.fsf@windlord.stanford.edu>\*(Aq \& @02014A2DD6231FCC00000000000000000000@ \& % grephistory \-l \*(Aq<87fxeaay1z.fsf@windlord.stanford.edu>\*(Aq \& [B6DDF69376E3CC199246CEC949B3ACAC] 1244517923~\-~1244517912 \& @02014A2DD6231FCC00000000000000000000@ .Ve .PP With \fBsm\fR, we can retrieve the article, and get its posting date: .PP .Vb 3 \& % grephistory \*(Aq<87fxeaay1z.fsf@windlord.stanford.edu>\*(Aq \e \& | sm | grep Date \& Date: Mon, 08 Jun 2009 20:25:12 \-0700 \& \& % convdate \-dc 1244517912 \& Tue, 9 Jun 2009 03:25:12 \-0000 (UTC) .Ve .PP It matches the number recorded in history as for its posting date. .SH HISTORY .IX Header "HISTORY" Written by Rich $alz for InterNetNews. Rewritten in POD by Russ Allbery . .SH "SEE ALSO" .IX Header "SEE ALSO" history(5), inn.conf(5), sm(1).