SM(1) | InterNetNews Documentation | SM(1) |
sm - Command-line interface to the INN storage manager
sm [-cdHiqRrSs] [token ...]
The INN storage manager is the subsystem that stores and keeps track of all of the articles and what storage backend they're in. All stored articles are assigned a storage API token. sm is a command-line interface to that storage manager, primarily used to retrieve articles by those tokens but also to perform other operations on the storage subsystem.
token is the token of an article (the same thing that's returned by grephistory or stored in the history file). It looks something like:
@0502000005A4000000010000000000000000@
Any number of tokens can be given on the command-line for any function other than -s. If none are, sm normally reads tokens from standard input, one per line. The default operation is to retrieve and write to standard output the corresponding article for each token given.
If -s is given, sm instead stores the article given on standard input (in native format, not wire format) using the standard rules of the storage subsystem. If the article is stored successfully, the token of the article is printed to standard output. Please note that this does not make any attempt to write a history entry or any overview data, and is therefore only useful under very specific circumstances.
If all operations were successful, sm exits with status 0. If an operation on any of the provided tokens fails, sm will exit with status 1, even if the operations on other tokens were successful. In other words, if twenty tokens are fed to "sm -r" on stdin, 19 articles were successfully removed, but the sixth article couldn't be found, sm will still exit with status 1.
This means that if you need to be sure whether a particular operation succeeded, you should run sm on one token at a time.
Written by Katsuhiro Kondou <kondou@nec.co.jp> for InterNetNews. Rewritten in POD by Russ Allbery <eagle@eyrie.org>.
$Id: sm.pod 9767 2014-12-07 21:13:43Z iulius $
ctlinnd(8), grephistory(1), history(5), rnews(1), storage.conf(5).
2015-09-12 | INN 2.6.3 |