1GREPHISTORY(1) InterNetNews Documentation GREPHISTORY(1)
2
3
4
6 grephistory - Query the INN history database
7
9 grephistory [-eilnqsv] [-f db] [message-id]
10
12 grephistory queries the INN history database for information about the
13 specified message-ID. If no flags are given, the program prints the
14 storage API token of the corresponding article, or "/dev/null" if the
15 article is listed in the history database but not stored on the server.
16 If the message-ID cannot be found in the database, grephistory will
17 print "grephistory: not found" and exit with a non-zero status.
18
19 Be sure to escape any special characters in the message ID from the
20 shell. Single quotes are recommended for this purpose since many
21 message-IDs contain dollar signs.
22
24 -e Only print the storage token if the article is stored on the
25 system. (In other words, suppress the "/dev/null" or "not found"
26 output for missing or remembered articles.)
27
28 -f db
29 Query the history database db rather than the default history
30 database.
31
32 -i Rather than expecting a message-ID on the command line, grephistory
33 will read a list of message-IDs on standard input, one per line.
34 Leading and trailing whitespace is ignored, as are any malformed
35 lines. It will print on standard output those message-IDs which
36 are not found in the history database. This is used when
37 processing "ihave" control messages.
38
39 -l Display the entire line from the history database, rather than just
40 the storage API token. If the message-ID is present in the history
41 database but has no storage API token, grephistory does not print
42 anything.
43
44 -n If the message-ID is present in the history database but has no
45 storage API token, print "/dev/null" and exit successfully. This
46 can happen if an article has been cancelled or expired, but history
47 information has still been retained. This is the default behavior.
48
49 -q Don't print any message, but still exit with the appropriate
50 status.
51
52 -s Rather than expecting a message-ID on the command line, grephistory
53 will read a list of message-IDs on standard input, one per line.
54 Leading and trailing whitespace is ignored, as are any malformed
55 lines. It will print on standard output the storage API tokens for
56 any articles that are still available, one per line. This flag is
57 used when processing "sendme" control messages.
58
59 -v Print out the hash of the message-ID for diagnostic purposes, as
60 well as any other requested information. This flag is not useful
61 with -i or -s.
62
64 In case the requested article is not listed in the history database:
65
66 % grephistory '<unknown.article@news.example.com>'
67 grephistory: not found
68 % grephistory -v '<unknown.article@news.example.com>'
69 grephistory: not found (hash is 501C66C22932BA91131186D7218201EB)
70
71 In case the requested article is listed in the history database but not
72 stored on the server:
73
74 % grephistory '<remembered.article@news.example.com>'
75 /dev/null
76
77 In case the requested article is stored on the server:
78
79 % grephistory '<87fxeaay1z.fsf@windlord.stanford.edu>'
80 @02014A2DD6231FCC00000000000000000000@
81 % grephistory -l '<87fxeaay1z.fsf@windlord.stanford.edu>'
82 [B6DDF69376E3CC199246CEC949B3ACAC] 1244517923~-~1244517912 @02014A2DD6231FCC00000000000000000000@
83
84 With sm, we can retrieve the article, and get its posting date:
85
86 % grephistory '<87fxeaay1z.fsf@windlord.stanford.edu>' | sm | grep Date
87 Date: Mon, 08 Jun 2009 20:25:12 -0700
88
89 % convdate -dc 1244517912
90 Tue, 9 Jun 2009 03:25:12 -0000 (UTC)
91
92 It matches the number recorded in history as for its posting date.
93
95 Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. Rewritten
96 in POD by Russ Allbery <eagle@eyrie.org>.
97
99 history(5), inn.conf(5), sm(1).
100
101
102
103INN 2.6.5 2022-01-23 GREPHISTORY(1)