This file is indexed.

/usr/share/doc/refdb/refdb-manual/re06.html is in refdb-doc 1.0.2-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>refdba</title><link rel="stylesheet" type="text/css" href="manual.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /><link rel="home" href="index.html" title="RefDB handbook" /><link rel="up" href="ch13.html" title="Chapter 13. Administration tools" /><link rel="prev" href="ch13.html" title="Chapter 13. Administration tools" /><link rel="next" href="re07.html" title="refdb-backup" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">refdba</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch13.html">Prev</a> </td><th width="60%" align="center">Chapter 13. Administration tools</th><td width="20%" align="right"> <a accesskey="n" href="re07.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="refentry-refdba"></a><div class="titlepage"></div><div class="refnamediv"><a id="refdba-name"></a><h2>Name</h2><p>refdba — the administration client of RefDB</p></div><div class="refsynopsisdiv"><a id="refdba-synopsis"></a><h2>Synopsis</h2><p>Interactive mode:</p><div class="cmdsynopsis"><p><code class="command">refdba</code>  [<code class="option">-c</code> <em class="replaceable"><code>pager-command</code></em>] [<code class="option">-e</code> <em class="replaceable"><code>log-destination</code></em>] [<code class="option">-f</code> <em class="replaceable"><code>stdin</code></em>] [<code class="option">-h</code> ] [<code class="option">-i</code> <em class="replaceable"><code>IP-address</code></em>] [<code class="option">-l</code> <em class="replaceable"><code>log-level</code></em>] [<code class="option">-L</code> <em class="replaceable"><code>log-file</code></em>] [<code class="option">-p</code> <em class="replaceable"><code>port</code></em>] [<code class="option">-q</code> ] [<code class="option">-T</code> <em class="replaceable"><code>time</code></em>] [<code class="option">-u</code> <em class="replaceable"><code>name</code></em>] [<code class="option">-v</code> ] [<code class="option">-V</code> ] [<code class="option">-w</code> <em class="replaceable"><code>password</code></em>] [<code class="option">-x</code> ] [<code class="option">-y</code> <em class="replaceable"><code>confdir</code></em>]<br />  <em class="replaceable"><code>Non-Interactive</code></em>   <em class="replaceable"><code>mode:</code></em> </p></div><p>Batch mode:</p><div class="cmdsynopsis"><p><code class="command">refdba</code>   <code class="option">-C</code> <em class="replaceable"><code>command</code></em>  [<code class="option">-c</code> <em class="replaceable"><code>pager-command</code></em>] [<code class="option">-e</code> <em class="replaceable"><code>log-destination</code></em>] [<code class="option">-f</code> <em class="replaceable"><code>stdin</code></em>] [<code class="option">-i</code> <em class="replaceable"><code>IP-address</code></em>] [<code class="option">-l</code> <em class="replaceable"><code>log-level</code></em>] [<code class="option">-L</code> <em class="replaceable"><code>log-file</code></em>] [<code class="option">-p</code> <em class="replaceable"><code>port</code></em>] [<code class="option">-q</code> ] [<code class="option">-T</code> <em class="replaceable"><code>time</code></em>] [<code class="option">-u</code> <em class="replaceable"><code>name</code></em>] [<code class="option">-w</code> <em class="replaceable"><code>password</code></em>] [<code class="option">-x</code> ] [<code class="option">-y</code> <em class="replaceable"><code>confdir</code></em>]</p></div></div><div class="refsect1"><a id="refdba-description"></a><h2>Description</h2><p>refdba is a command-line client providing the commands to administer RefDB(7) databases, users, and styles. refdba can be started in an interactive mode, providing a command prompt. Type <span class="emphasis"><em>?</em></span> or <span class="emphasis"><em>help</em></span> to see a list of available commands. Alternatively you can start refdba in non-interactive mode. refdba will execute the requested command and return. In this mode refdba will accept input on stdin for a variety of commands, allowing Unix piping.</p></div><div class="refsect1"><a id="refdba-options"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-c</code> <em class="replaceable"><code>pager-command</code></em></span></dt><dd><p>The command line of the pager that is to be used. Instead of a pager you can of course specify any valid command that accepts data on stdin. Use "stdout" to request data output to stdout. This is the default, but you may want to specify it on the command line if you need to temporarily override a default pager setting in your configuration file.</p></dd><dt><span class="term"><code class="option">-C</code> <em class="replaceable"><code>command</code></em></span></dt><dd><p>The command to be run in non-interactive mode. You can supply all options and parameters that the command accepts on the refdba command line.</p></dd><dt><span class="term"><code class="option">-e</code> <em class="replaceable"><code>log-destination</code></em></span></dt><dd><p>log-destination can have the values 0, 1, or 2, or the equivalent strings <span class="emphasis"><em>stderr</em></span>, <span class="emphasis"><em>syslog</em></span>, or <span class="emphasis"><em>file</em></span>, respectively. This value specifies where the log information goes to. <code class="literal">0</code> (zero) means the messages are sent to stderr. They are immediately available on the screen but they may interfere with command output. <code class="literal">1</code> will send the output to the syslog facility. Keep in mind that syslog must be configured to accept log messages from user programs, see the syslog(8) man page for further information. Unix-like systems usually save these messages in <code class="filename">/var/log/user.log</code>. <code class="literal">2</code> will send the messages to a custom log file which can be specified with the <code class="option">-L</code> option.</p></dd><dt><span class="term"><code class="option">-f</code> <em class="replaceable"><code>stdin</code></em></span></dt><dd><p>Read data from stdin. refdbc usually knows when it should read from stdin. However, a few commands use data supplied in the command line but also allow to read from a file. Use this option to force refdbc to read from stdin <span class="emphasis"><em>in addition</em></span> to values supplied on the command line.</p></dd><dt><span class="term"><code class="option">-h</code></span></dt><dd><p>Displays help and usage screen, then exits.</p></dd><dt><span class="term"><code class="option">-i</code> <em class="replaceable"><code>IP-address</code></em></span></dt><dd><p>Set the IP address of the box which is running the application server refdbd(1). Instead of the IP address you can also specify the hostname as long as it can be properly resolved by your system.</p></dd><dt><span class="term"><code class="option">-l</code> <em class="replaceable"><code>log-level</code></em></span></dt><dd><p>Specify the priority up to which events are logged. This is either a number between <code class="literal">0</code> and <code class="literal">7</code> or one of the strings <span class="emphasis"><em>emerg</em></span>, <span class="emphasis"><em>alert</em></span>, <span class="emphasis"><em>crit</em></span>, <span class="emphasis"><em>err</em></span>, <span class="emphasis"><em>warning</em></span>, <span class="emphasis"><em>notice</em></span>, <span class="emphasis"><em>info</em></span>, <span class="emphasis"><em>debug</em></span>, respectively (see also Log level definitions). <code class="option">-1</code> disables logging completely. A low log level like <code class="literal">0</code> means that only the most critical messages are logged. A higher log level means that less critical events are logged as well. <code class="literal">7</code> will include debug messages. The latter can be verbose and abundant, so you want to avoid this log level unless you need to track down problems.</p></dd><dt><span class="term"><code class="option">-L</code> <em class="replaceable"><code>log-file</code></em></span></dt><dd><p>Specify the full path to a log file that will receive the log messages. Typically this would be <code class="filename">/var/log/refdba</code>.</p></dd><dt><span class="term"><code class="option">-p</code> <em class="replaceable"><code>port</code></em></span></dt><dd><p>Set the port of the box which is running the application server.</p></dd><dt><span class="term"><code class="option">-q</code></span></dt><dd><p>Start without reading the configuration files. The client will use the compile-time defaults for all values that you do not set with command-line switches. Useful for debugging config files.</p></dd><dt><span class="term"><code class="option">-T</code> <em class="replaceable"><code>time</code></em></span></dt><dd><p>Set the timeout for client/application server dialogue in seconds. A connection with unsuccessful read or write attempts will be considered as dead and taken down after this amount of time has elapsed.</p></dd><dt><span class="term"><code class="option">-u</code> <em class="replaceable"><code>name</code></em></span></dt><dd><p>Set the username for the database access.
	  Note: This username need not be identical to the login name of the user. This is the username required to access the database server.</p></dd><dt><span class="term"><code class="option">-v</code></span></dt><dd><p>Prints version and copyright information, then exits.</p></dd><dt><span class="term"><code class="option">-V</code></span></dt><dd><p>Switches to verbose mode.</p></dd><dt><span class="term"><code class="option">-w</code> <em class="replaceable"><code>password</code></em></span></dt><dd><p>Set the password for the database access.
	  Note: This password need not be identical to the login password of the user. This is the password required to access the database server.</p></dd><dt><span class="term"><code class="option">-x</code></span></dt><dd><p>Send passwords unencrypted.</p></dd><dt><span class="term"><code class="option">-y</code> <em class="replaceable"><code>confdir</code></em></span></dt><dd><p>Specify the directory where the global configuration files are
	  Note: By default, all RefDB applications look for their configuration files in a directory that is specified during the configure step when building the package. That is, you don't need the <code class="option">-y</code> option unless you use precompiled binaries in unusual locations, e.g. by relocating a rpm package.</p></dd></dl></div></div><div class="refsect1"><a id="refdba-diagnostics"></a><h2>Diagnostics</h2><p>The exit code is 0 if all went fine. It will be 1 if the command (when run in batch mode) or the last command (when run in interactive mode) returned an error, or if there was a general error condition during startup like a lack of available memory.</p></div><div class="refsect1"><a id="refdba-configuration"></a><h2>Configuration</h2><p>refdba evaluates the <code class="filename">refdbarc</code> configuration file at startup to initialize itself.</p><div class="table"><a id="idp68415712"></a><p class="title"><strong>Table 13.1. refdbarc</strong></p><div class="table-contents"><table summary="refdbarc" border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Variable</th><th>Default</th><th>Comment</th></tr></thead><tbody><tr><td>logfile</td><td>/var/log/refdba.log</td><td>The full path of a custom log file. This is used only if logdest is set appropriately. If you start refdba from the command line as a regular user, you should specify a file that you have write access to (you may not be allowed to create <code class="filename">/var/log/refdb.log</code> or write to this file as a regular user).</td></tr><tr><td>logdest</td><td>2</td><td>The destination of the log information. 0 = print to stderr (this is mainly intended for debugging, as it may visually interfere with command output); 1 = use the syslog facility; 2 = use a custom logfile. The latter needs a proper setting of logfile.</td></tr><tr><td>loglevel</td><td>6</td><td>The log level up to which messages will be logged. A low setting (0) allows only the most important messages, a high setting (7) allows all messages including debug messages. -1 means nothing will be logged.</td></tr><tr><td>pager</td><td>stdout</td><td>The command line of a pager that accepts the output of refdb on stdin to allow scrolling and other nifty things. <span class="quote"><span class="quote">stdout</span></span> sends the data to stdout.</td></tr><tr><td>passwd</td><td>*</td><td>The password which is used for authentication with the database server. It is potentially evil to store unencrypted passwords in disk files. At least make sure that the configuration file is not readable for anyone else. The default setting causes refdba to ask for your password interactively.</td></tr><tr><td>port</td><td>9734</td><td>The port on which <span class="application">refdbd</span> listens. Change this for all clients and the server if this value interferes with another program using this port.</td></tr><tr><td>serverip</td><td>127.0.0.1</td><td>The IP address or hostname of the machine where <span class="application">refdbd</span> runs. Use the default (localhost) address if the clients and refdbd run on the same machine.</td></tr><tr><td>timeout</td><td>180</td><td>The timeout in seconds. After this time has elapsed, a stalled connection is taken down. Increase this value if you encounter frequent timeout errors due to high network traffic or <span class="application">refdbd</span> overload.</td></tr><tr><td>username</td><td>login name</td><td>The username which is used for authentication with the database server. This may be different from the login name of the user.</td></tr><tr><td>verbose</td><td>f</td><td>Set this to t if you prefer verbose error messages.</td></tr><tr><td>no_encrypt</td><td>f</td><td>If set to 't', passwords are transmitted unencrypted. The default is to encrypt passwords.</td></tr></tbody></table></div></div><br class="table-break" /></div><div class="refsect1"><a id="refdba-commands"></a><h2>Commands</h2><p>All commands consist of a single word which specifies the command. This may be followed by arguments and/or switches. The general syntax rules of the getopts library apply.</p><div class="refsect2"><a id="app-a-command-addstyle"></a><h3>addstyle</h3><div class="refsect3"><a id="refdba-addstyle-synopsis"></a><h4>Synopsis</h4><div class="cmdsynopsis"><p><code class="command">addstyle</code>  [<code class="option">-c</code> <em class="replaceable"><code>command</code></em>] [<code class="option">-h</code>] [[<code class="option">-o</code> <em class="replaceable"><code>filename</code></em>] |  [<code class="option">-O</code> <em class="replaceable"><code>filename</code></em>]] {<em class="replaceable"><code>style-file</code></em>...}</p></div></div><div class="refsect3"><a id="refdba-addstyle-description"></a><h4>Description</h4><p>Adds one or more bibliography style specifications from the input file(s).</p></div><div class="refsect3"><a id="refdba-addstyle-options"></a><h4>Options</h4><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-c</code> <em class="replaceable"><code>command</code></em></span></dt><dd><p>Specifies a command that will receive the output instead of the default pager. This may be a different pager, any command that takes input on stdin, or the string <span class="quote"><span class="quote">stdout</span></span> to send the data to <code class="filename">stdout</code> without using a pager.</p></dd><dt><span class="term"><code class="option">-h</code></span></dt><dd><p>Displays the online help about the <span class="command"><strong>addstyle</strong></span> command.</p></dd><dt><span class="term"><code class="option">-o</code> <em class="replaceable"><code>filename</code></em></span></dt><dd><p>Write the output to <em class="replaceable"><code>filename</code></em> instead of to stdout.</p></dd><dt><span class="term"><code class="option">-O</code> <em class="replaceable"><code>filename</code></em></span></dt><dd><p>Append the output to <em class="replaceable"><code>filename</code></em> instead of writing it to stdout.</p></dd><dt><span class="term"><em class="replaceable"><code>style-file</code></em></span></dt><dd><p>All other arguments are interpreted as the names of files containing style specifications.</p></dd></dl></div></div><div class="refsect3"><a id="refdb-addstyle-example"></a><h4>Example</h4><pre class="screen">
	  <code class="prompt">refdba: </code>
	  <strong class="userinput"><code>addstyle j.biol.chem.xml pharmacol.rev.xml</code></strong>
	</pre><p>This will add the style specifications contained in the files <code class="filename">j.biol.chem.xml</code> and <code class="filename">pharmacol.rev.xml</code> to the bibliography style database.</p></div></div><div class="refsect2"><a id="app-a-command-adduser"></a><h3>adduser</h3><div class="refsect3"><a id="refdba-adduser-synopsis"></a><h4>Synopsis</h4><div class="cmdsynopsis"><p><code class="command">adduser</code>  {<code class="option">-d</code> <em class="replaceable"><code>database</code></em>} [<code class="option">-h</code>] {<code class="option">-H</code> <em class="replaceable"><code>host-IP</code></em>} [<code class="option">-R</code>] [<code class="option">-W</code> <em class="replaceable"><code>password</code></em>] {[<code class="option">-f</code> <em class="replaceable"><code>file</code></em>] |  [
	      <em class="replaceable"><code>username</code></em>
	    ...]}</p></div></div><div class="refsect3"><a id="refdba-adduser-description"></a><h4>Description</h4><p>Grants access rights to a refdb database to the given users. Specify the database with the <code class="option">-d</code> option.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>If a user is not yet known to the database server, refdb will create an account with the default access rights (=none). If you do not specify a password for the new user with the <code class="option">-W</code> option (see below), the user will have access to the database server with the default password "refdb". In most cases this is not a good thing.</p><p>A new user will automatically get access to the internal refdb database refdb.</p><p>Some database engines like SQLite do not support access control. The <span class="command"><strong>adduser</strong></span> command is not supported with these engines and will just return an explanatory message.</p></div><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-d</code> <em class="replaceable"><code>database</code></em></span></dt><dd><p>Specifies the reference database for which the access rights should apply.</p></dd><dt><span class="term"><code class="option">-f</code> <em class="replaceable"><code>file</code></em></span></dt><dd><p>Reads a whitespace-separated list of usernames from <code class="filename">file</code>.</p></dd><dt><span class="term"><code class="option">-h</code></span></dt><dd><p>Displays the online help about the <span class="command"><strong>adduser</strong></span> command.</p></dd><dt><span class="term"><code class="option">-H</code> <em class="replaceable"><code>hostname</code></em></span></dt><dd><p><em class="replaceable"><code>hostname</code></em> specifies the host the refdb application server runs on. If it runs on the same machine as the database server, you may specify <span class="quote"><span class="quote">localhost</span></span> as hostname. Use <span class="quote"><span class="quote">%</span></span> as hostname to allow access from all addresses except localhost. Otherwise, the hostname argument can be either a hostname, an IP address, or a subnet that specifies one or more computers to allow access from. You can add the same user several times with different hostnames.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This option is only supported by MySQL. It is ignored if you use PostgreSQL as your database server. Please see the PostgreSQL documentation for help on how to manipulate host-based access control with the <code class="filename">pg_hba.conf</code> file.</p></div></dd><dt><span class="term"><code class="option">-R</code></span></dt><dd><p>Use this option to grant read-only access for the user. By default, users are granted read/write access. Users with read-only access can basically only retrieve references and notes.</p></dd><dt><span class="term"><code class="option">-W</code> <em class="replaceable"><code>password</code></em></span></dt><dd><p>Set the password for a new user. The password is encrypted before transferring it to the application server. If the user already exists, his password will be changed accordingly.</p></dd><dt><span class="term"><em class="replaceable"><code>username</code></em></span></dt><dd><p>All other arguments are interpreted as usernames. If neither a username argument nor an input file is specified, refdba attempts to read a whitespace-separated list of names from stdin. To force refdba to read from stdin <span class="emphasis"><em>in addition to</em></span> explicitly named users, use the <code class="option">-f stdin</code> option.</p></dd></dl></div></div><div class="refsect3"><a id="refdba-adduser-examples"></a><h4>Examples</h4><pre class="screen">
	  <code class="prompt">refdba: </code>
	  <strong class="userinput"><code>adduser <code class="option">-d</code> <em class="replaceable"><code>db1</code></em> <code class="option">-N</code> <em class="replaceable"><code>newpass</code></em>jim </code></strong>
	</pre><p>This will grant access to the database <code class="filename">db1</code> for the new user jim. refdbd runs on the same computer as the database server (if you leave out the <code class="option">-H</code> option, localhost is assumed). "jim" will have to provide "newpass" as a password when starting one of the refdb clients.</p><pre class="screen">
	  <code class="prompt">refdba: </code>
	  <strong class="userinput"><code>adduser <code class="option">-d</code> <em class="replaceable"><code>db1</code></em> <code class="option">-H</code> <em class="replaceable"><code>mono.mycomp.com</code></em> jim jane</code></strong>
	</pre><p>This will grant access to the database <code class="filename">db1</code> for the users jim and jane. refdbd runs on the computer with the name "mono.mycomp.com". If "jim" and "jane" are already known to the database server, they will keep their existing passwords. If not, they will have to use the default password "refdb".</p></div><div class="refsect3"><a id="idp69028336"></a><h4>Alternatives on sites with restricted database server access</h4><p>If you as the refdb administrator do not have GRANT permission on your database server, the <span class="command"><strong>adduser</strong></span> command is bound to fail. As a security-minded person your database administrator might refuse to run refdba regardless of how often you ensure him it doesn't contain malicious code. He'll want to do it the hard way, and this is what he needs to do:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>If you use MySQL as your database server, each new user needs at least entries in the mysql.user and mysql.db tables. Your database administrator might have set up his own rules, but in general the mysql.user table should grant no privileges to the user, whereas the mysql.db table should grant INSERT, SELECT, UPDATE, DELETE permissions to each user for the <code class="filename">refdb</code> database and SELECT, INSERT, UPDATE, DELETE, CREATE, DROP privileges for each reference database the user should have access to. Make sure to mention that the Host field in mysql.user must contain the name or address of the box that runs refdbd, which is not necessarily identical with the workstation of the user.</p></li><li class="listitem"><p>If you prefer PostgreSQL instead, things are a little simpler. When you create a refdb database, a new group will be created to manage access to this database. All your database administrator needs to do is to add the new user to the groups refdbuser (granting access to the common refdb database) and &lt;dbname&gt;user, where &lt;dbname&gt; is the name of the reference database the user should be allowed to access.</p></li></ul></div></div></div><div class="refsect2"><a id="app-a-command-addword"></a><h3>addword</h3><div class="refsect3"><a id="refdba-addword-synopsis"></a><h4>Synopsis</h4><div class="cmdsynopsis"><p><code class="command">addword</code>  [<code class="option">-h</code>] {[<code class="option">-f</code> <em class="replaceable"><code>file</code></em>] |  [<em class="replaceable"><code>word</code></em>...]...}</p></div></div><div class="refsect3"><a id="refdba-addword-description"></a><h4>Description</h4><p>Most bibliography styles use standardized abbreviations of the journal names. Most data sources specify these abbreviations without dots, as in "Mol Cell Biol". If the words are to be abbreviated with dots (as in "Mol. Cell Biol.") in the bibliography, refdb needs to know which tokens in the abbreviated name are indeed abbreviated (e.g. "Mol."), and which are full words (e.g. "Cell"). To this end, refdb keeps a list of reserved words which are known not to be abbreviations of something else. refdb ships with a fairly complete list of such words, but if you detect errors or omissions, the <span class="command"><strong>addword</strong></span> command comes in handy.</p></div><div class="refsect3"><a id="refdba-addword-options"></a><h4>Options</h4><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-f</code> <em class="replaceable"><code>file</code></em></span></dt><dd><p>Read a whitespace-separated list of journal title words from <code class="filename">file</code>.</p></dd><dt><span class="term"><code class="option">-h</code></span></dt><dd><p>Displays the online help about the <span class="command"><strong>addword</strong></span> command.</p></dd><dt><span class="term"><em class="replaceable"><code>word</code></em></span></dt><dd><p>All other arguments are interpreted as reserved words. If neither a word list nor an input file is specified, refdba attempts to read a whitespace-separated list of words from stdin. To force refdba to read from stdin <span class="emphasis"><em>in addition to</em></span> explicitly listed words, use the <code class="option">-f stdin</code> option.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>refdb will convert all reserved words to uppercase internally, so it does not matter which case you provide these words in.</p></div></dd></dl></div></div><div class="refsect3"><a id="refdba-addword-example"></a><h4>Example</h4><pre class="screen">
	  <code class="prompt">refdba: </code>
	  <strong class="userinput"><code>addword -f wordlist FOO BAR</code></strong>
	</pre><p>This will add all reserved words in the file <code class="filename">wordlist</code> as well as the words "FOO" and "BAR" to the list of reserved words.</p></div></div><div class="refsect2"><a id="app-a-command-confserv"></a><h3>confserv</h3><div class="refsect3"><a id="refdba-confserv-synopsis"></a><h4>Synopsis</h4><div class="cmdsynopsis"><p><code class="command">confserv</code>  {<em class="replaceable"><code>command</code></em>} [<em class="replaceable"><code>value</code></em>]</p></div></div><div class="refsect3"><a id="refdba-confserv-description"></a><h4>Description</h4><p>Configures the application server while it is running and does some tricks with the refdb helper databases as well. Some of the commands modify variables that can be set as command line arguments or with the init file. See <a class="link" href="ch12.html" title="Chapter 12. The application server">Running the refdbd daemon</a> for more information about these variables.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This command will only reconfigure refdbd transiently. All changes are lost when the application server is restarted. To make permantent changes to the configuration, edit the init-file or change the command-line parameters in the script that starts refdbd. Please note also that <a class="link" href="ch12.html" title="Chapter 12. The application server">remote administration</a> must be enabled for this command to work.</p></div><p>The following commands are available:</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">stop</span></dt><dd><p>Stops the application server.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This command affects only the refdbd parent process. Any children that may be currently serving clients will continue to do so until they are done.</p></div></dd><dt><span class="term">ping</span></dt><dd><p>Checks whether the application server is still alive and well. If this is the case, it will report the process IDs of the child that handles your query and of the parent. If not, the connection will time out with no response.</p></dd><dt><span class="term">serverip <em class="replaceable"><code>value</code></em></span></dt><dd><p>Sets the database server IP address to <em class="replaceable"><code>value</code></em>.</p></dd><dt><span class="term">timeout <em class="replaceable"><code>value</code></em></span></dt><dd><p>Sets the timeout in seconds to <em class="replaceable"><code>value</code></em>.</p></dd><dt><span class="term">logdest <em class="replaceable"><code>value</code></em></span></dt><dd><p>Sets the destination of log output to <em class="replaceable"><code>value</code></em>. Possible values are 0 (stderr), 1 (the system syslog facility), 2 (a private log file as defined by <em class="replaceable"><code>logfile</code></em>).</p></dd><dt><span class="term">logfile <em class="replaceable"><code>value</code></em></span></dt><dd><p>Sets the filename of the log file to <em class="replaceable"><code>value</code></em>.</p></dd><dt><span class="term">loglevel <em class="replaceable"><code>value</code></em></span></dt><dd><p>Sets the maximum level of messages to be logged to <em class="replaceable"><code>value</code></em>. 0 means that only critical errors will be logged, 7 means that all messages including the extremely verbose debug messages will be logged. -1 disables logging completely.</p></dd></dl></div></div><div class="refsect3"><a id="refdba-confserv-example"></a><h4>Example</h4><pre class="screen"><code class="prompt">refdba: </code>confserv loglevel 7</pre><p>This will set the log level to 7. This temporary change will only be effective until refdbd is restarted.</p></div></div><div class="refsect2"><a id="app-a-command-createdb"></a><h3>createdb</h3><div class="refsect3"><a id="refdba-createdb-synopsis"></a><h4>Synopsis</h4><div class="cmdsynopsis"><p><code class="command">createdb</code>  [<code class="option">-E</code> <em class="replaceable"><code>encoding</code></em>] [<code class="option">-h</code>] {<em class="replaceable"><code>dbname</code></em>...}</p></div></div><div class="refsect3"><a id="refdba-createdb-description"></a><h4>Description</h4><p>Creates a new database with the name <em class="replaceable"><code>dbname</code></em>. Several databases may be specified in a single call of this command.</p></div><div class="refsect3"><a id="refdba-createdb-options"></a><h4>Options</h4><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-E</code> <em class="replaceable"><code>encoding</code></em></span></dt><dd><p>Select a character encoding for the new database. This is currently only supported by MySQL and PostgreSQL. If you use a different engine, this option is ignored. Please see the documentation of your database engine installation for available encodings. The value passed with the <code class="option">-E</code> option should be the <a class="ulink" href="http://www.iana.org" target="_top">IANA</a> encoding name. If you do not use this option, the new database will use the default encoding of the database server unless your refdbdrc configuration file sets a default with a "db_encoding" entry.</p></dd><dt><span class="term"><code class="option">-h</code></span></dt><dd><p>Displays the online help about the <span class="command"><strong>createdb</strong></span> command.</p></dd><dt><span class="term"><em class="replaceable"><code>name</code></em></span></dt><dd><p>The name of the reference database. The name must not contain a colon (':') or a dash ('-') due to the citation formats in documents using RefDB. The allowed characters may be further restricted by the database engine you use. The database name should also be considered case-insensitive, i.e. don't try to create a database "mybase" if you already have one called "MYBASE". Also, avoid using names which are SQL reserved words as this is doomed to fail. Unfortunately, this includes the all too convenient name "references". Try "refs" or "biblio" instead.</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p>Prepend a constant string like <span class="quote"><span class="quote">rd</span></span> to all refdb database names. This speeds up retrieving refdb databases with the <a class="link" href="re06.html#app-a-command-listdb" title="listdb"><span class="command"><strong>listdb</strong></span></a> command if your database engine manages additional, non-RefDB databases. Use a simple regular expression like <span class="quote"><span class="quote">rd%</span></span> to restrict your search to RefDB databases.</p></div></dd></dl></div></div><div class="refsect3"><a id="refdba-createdb-example"></a><h4>Example</h4><pre class="screen">
	  <code class="prompt">refdba: </code>
	  <strong class="userinput"><code>createdb <em class="replaceable"><code>db1</code></em> <code class="option">-E</code> <em class="replaceable"><code>UTF-8</code></em> <em class="replaceable"><code>db2</code></em></code></strong>
	</pre><p>This will create the databases <code class="filename">db1</code> and <code class="filename">db2</code> with the character encoding UTF-8.</p></div><div class="refsect3"><a id="idp69561072"></a><h4>Using SQL scripts to create databases</h4><p>refdb contains two plain-text SQL scripts (installed in <code class="filename">/usr/local/share/refdb/sql</code>) to create database tables just like the <span class="command"><strong>createdb</strong></span> command does. These scripts are preferable to the command in these cases:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>You do not have database administrator permissions and have to ask your admin to create the databases for you. Your admin might prefer to run the script as he can easily find out what it is going to do.</p></li><li class="listitem"><p>You want to integrate refdb with an existing or a custom database system. In that case you want the refdb-specific tables in an existing database in addition to non-refdb tables.</p></li></ul></div><p>The following procedures are equivalent to running the createdb command. If you want to add the tables to an existing database, please adapt the scripts and/or the procedures accordingly.</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>If you're running MySQL, use the following commands (provide additional options like username and password as required):</p><pre class="screen">
	      <code class="prompt">#~ </code>
	      <strong class="userinput"><code>mysql -e "CREATE DATABASE dbname"</code></strong>
	    </pre><pre class="screen">
	      <code class="prompt">#~ </code>
	      <strong class="userinput"><code>mysql dbname &lt; empty.mysql.dump</code></strong>
	    </pre></li><li class="listitem"><p>If you're using PostgreSQL, the following sequence should work (again, provide additional options like username and password as required):</p><pre class="screen">
	      <code class="prompt">#~ </code>
	      <strong class="userinput"><code>sed 's/refdbtest/dbname/g' &lt; empty.pgsql.dump.in &gt; empty.pgsql.dump</code></strong>
	    </pre><pre class="screen">
	      <code class="prompt">#~ </code>
	      <strong class="userinput"><code>psql template1 &lt; empty.pgsql.dump</code></strong>
	    </pre></li></ul></div><p>The <code class="filename">empty.pgsql.dump.in</code> script contains the commands to create a database and to set appropriate access rights for a new group of database users. Therefore it is a good idea to replace the string "refdbtest" with the intended name of your new database. The <span class="command"><strong>sed</strong></span> command in the first line does just this. You may also edit a few more things, like the encoding. The second command actually creates the database, a new group, grants privileges to this group, and creates all necessary tables and sequences. <code class="filename">template1</code> is a PostgreSQL system database. The <span class="command"><strong>psql</strong></span> command requires the name of an existing database as an argument, but in this case you could use any other existing database just as well.</p></div></div><div class="refsect2"><a id="app-a-command-deletedb"></a><h3>deletedb</h3><div class="refsect3"><a id="idp69583744"></a><h4>Synopsis</h4><div class="cmdsynopsis"><p><code class="command">deletedb</code>  [<code class="option">-h</code>] {<em class="replaceable"><code>dbname</code></em>...}</p></div></div><div class="refsect3"><a id="refdba-deletedb-description"></a><h4>Description</h4><p>Deletes the database with the name <em class="replaceable"><code>dbname</code></em>. Several databases may be specified in a single call of this command.</p><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Caution</h3><p>The database structure and the data will be gone, really gone, so be careful with this command. Think twice and, if in doubt, at least make a backup first to avoid extensive hairpulling.</p></div></div><div class="refsect3"><a id="refdba-deletedb-options"></a><h4>Options</h4><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-h</code></span></dt><dd><p>Displays a brief usage message and returns to the prompt.</p></dd><dt><span class="term"><em class="replaceable"><code>dbname</code></em></span></dt><dd><p>The name of the database to be deleted.</p></dd></dl></div></div><div class="refsect3"><a id="refdba-deletedb-example"></a><h4>Example</h4><pre class="screen">
	  <code class="prompt">refdba: </code>
	  <strong class="userinput"><code>deletedb <em class="replaceable"><code>db1</code></em> <em class="replaceable"><code>db2</code></em></code></strong>
	</pre><p>This will delete the databases <code class="filename">db1</code> and <code class="filename">db2</code>.</p></div></div><div class="refsect2"><a id="app-a-command-deletestyle"></a><h3>deletestyle</h3><div class="refsect3"><a id="refdba-deletestyle-synopsis"></a><h4>Synopsis</h4><div class="cmdsynopsis"><p><code class="command">deletestyle</code>  [<code class="option">-h</code>] {<em class="replaceable"><code>unix-regexp</code></em>}</p></div></div><div class="refsect3"><a id="refdba-deletestyle-description"></a><h4>Description</h4><p>Deletes the bibliography styles whose names match the Unix regular expression <em class="replaceable"><code>unix-regexp</code></em>.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Some database engines, like SQLite, do not support Unix-style regular expressions. Use SQL regular expressions instead.</p></div></div><div class="refsect3"><a id="refdba-deletestyle-options"></a><h4>Options</h4><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-h</code></span></dt><dd><p>Displays a brief usage message and returns to the prompt.</p></dd><dt><span class="term"><em class="replaceable"><code>unix-regexp</code></em></span></dt><dd><p>The remaining arguments are interpreted as a regular expression which specifies the style or styles to be deleted.</p></dd></dl></div></div><div class="refsect3"><a id="refdba-deletestyle-example"></a><h4>Example</h4><pre class="screen">
	  <code class="prompt">refdba: </code>
	  <strong class="userinput"><code>deletestyle <em class="replaceable"><code>J\..*</code></em></code></strong>
	</pre><p>This will delete all bibliography styles that start with <span class="quote"><span class="quote">J.</span></span>.</p></div></div><div class="refsect2"><a id="app-a-command-deleteuser"></a><h3>deleteuser</h3><div class="refsect3"><a id="refdba-deleteuser-synopsis"></a><h4>Synopsis</h4><div class="cmdsynopsis"><p><code class="command">deleteuser</code>  {<code class="option">-d</code> <em class="replaceable"><code>database</code></em>} [<code class="option">-h</code>] {<code class="option">-H</code> <em class="replaceable"><code>host-IP</code></em>} {<code class="option">-R</code>} {[<code class="option">-f</code> <em class="replaceable"><code>file</code></em>] |  [
	      <em class="replaceable"><code>username</code></em>
	    ...]}</p></div></div><div class="refsect3"><a id="refdba-deleteuser-description"></a><h4>Description</h4><p>Revokes access rights to a refdb database from the given users.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Some database engines like SQLite do not support access control. The <span class="command"><strong>adduser</strong></span> command is not supported with these engines and will just return an explanatory message.</p><p>refdb will only revoke the access rights to the specified database. It will revoke neither access rights to the internal database refdb, nor will it revoke database server access. You can revoke access to the internal database by specifying "refdb" with the <code class="option">-d</code> option. To revoke access to the database server, please use the command line utilities of your database server.</p></div></div><div class="refsect3"><a id="refdba-deleteuser-options"></a><h4>Options</h4><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-d</code> <em class="replaceable"><code>database</code></em></span></dt><dd><p>Specify the name of the database.</p></dd><dt><span class="term"><code class="option">-f</code> <em class="replaceable"><code>filename</code></em></span></dt><dd><p>Read the usernames from <em class="replaceable"><code>filename</code></em></p></dd><dt><span class="term"><code class="option">-h</code></span></dt><dd><p>Displays the online help about the <span class="command"><strong>deleteuser</strong></span> command.</p></dd><dt><span class="term"><code class="option">-H</code> <em class="replaceable"><code>hostname</code></em></span></dt><dd><p>Specify the hostname or IP address for which to modify the access rights. This must be the same name that you used for a previous call to <a class="link" href="re06.html#app-a-command-adduser" title="adduser">adduser</a>.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This option is only supported by MySQL. It is ignored if you useother database engines.</p></div></dd><dt><span class="term"><code class="option">-R</code></span></dt><dd><p>Revokes read-only access.</p></dd><dt><span class="term"><em class="replaceable"><code>username</code></em></span></dt><dd><p>All other arguments are interpreted as usernames. If neither a username argument nor an input file is specified, refdba attempts to read a whitespace-separated list of names from stdin. To force refdba to read from stdin <span class="emphasis"><em>in addition to</em></span> explicitly named users, use the <code class="option">-f stdin</code> option.</p></dd></dl></div></div><div class="refsect3"><a id="refdba-deleteuser-examples"></a><h4>Examples</h4><pre class="screen">
	  <code class="prompt">refdba: </code>
	  <strong class="userinput"><code>deleteuser <code class="option">-d</code> <code class="option">-H</code> <em class="replaceable"><code>%</code></em> <em class="replaceable"><code>db1</code></em>jim</code></strong>
	</pre><p>This will revoke the access to the database <code class="filename">db1</code> for the user jim for all but local connections.</p></div></div><div class="refsect2"><a id="app-a-command-deleteword"></a><h3>deleteword</h3><div class="refsect3"><a id="refdba-deleteword-synopsis"></a><h4>Synopsis</h4><div class="cmdsynopsis"><p><code class="command">deleteword</code>  [<code class="option">-h</code>] {[<code class="option">-f</code> <em class="replaceable"><code>file</code></em>] |  [
	      <em class="replaceable"><code>word</code></em>
	    ...]...}</p></div></div><div class="refsect3"><a id="refdba-deleteword-description"></a><h4>Description</h4><p>This command performs the reverse operation of <a class="link" href="re06.html#app-a-command-addword" title="addword">addword</a>. The specified reserved words will be removed from the list.</p></div><div class="refsect3"><a id="refdba-deleteword-options"></a><h4>Options</h4><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-f</code></span></dt><dd><p>Read a whitespace-separated list of words from <code class="filename">file</code>.</p></dd><dt><span class="term"><code class="option">-h</code></span></dt><dd><p>Displays the online help about the <span class="command"><strong>addword</strong></span> command.</p></dd><dt><span class="term"><em class="replaceable"><code>word</code></em></span></dt><dd><p>All other arguments are interpreted as reserved words. If neither a word list nor an input file is specified, refdba attempts to read a whitespace-separated list of words from stdin. To force refdba to read from stdin <span class="emphasis"><em>in addition to</em></span> explicitly listed words, use the <code class="option">-f stdin</code> option.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>refdb will convert all reserved words to uppercase internally, so it does not matter in which case you provide these words.</p></div></dd></dl></div></div><div class="refsect3"><a id="refdba-deleteword-example"></a><h4>Example</h4><pre class="screen">
	  <code class="prompt">refdba: </code>
	  <strong class="userinput"><code>deleteword -f wordlist FOO BAR</code></strong>
	</pre><p>This will delete all reserved words in the file <code class="filename">wordlist</code> as well as the words "FOO" and "BAR" from the list of reserved words.</p></div></div><div class="refsect2"><a id="app-a-command-getstyle"></a><h3>getstyle</h3><div class="refsect3"><a id="refdba-getstyle-synopsis"></a><h4>Synopsis</h4><div class="cmdsynopsis"><p><code class="command">getstyle</code>  [<code class="option">-c</code>] [<code class="option">-h</code>] [[<code class="option">-o</code>] |  [<code class="option">-O</code>]] {
	    <em class="replaceable"><code>style</code></em>
	  ...}</p></div></div><div class="refsect3"><a id="refdba-getstyle-description"></a><h4>Description</h4><p>Retrieves one or more bibliography style specifications from the database and formats them as an XML file.</p></div><div class="refsect3"><a id="refdba-getstyle-options"></a><h4>Options</h4><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-c</code> <em class="replaceable"><code>command</code></em></span></dt><dd><p>Specify a command that will receive the output instead of the default pager. This may be a different pager, any command that takes input on stdin, or the string <span class="quote"><span class="quote">stdout</span></span> to send the data to <code class="filename">stdout</code> without using a pager.</p></dd><dt><span class="term"><code class="option">-h</code></span></dt><dd><p>Displays the online help about the <span class="command"><strong>getstyle</strong></span> command.</p></dd><dt><span class="term"><code class="option">-o</code></span></dt><dd><p>Write the output to a file instead of to stdout.</p></dd><dt><span class="term"><code class="option">-O</code></span></dt><dd><p>Append the output to a file instead of writing it to stdout</p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>Be careful with the append (<code class="option">-O</code>) option. refdb will output the processing instructions, the doctype line, and one <code class="sgmltag-element">CITESTYLE</code> element for each individually requested style. If you concatenate the results of several <span class="command"><strong>getstyle</strong></span> calls, the resulting XML file will not be well-formed without further processing. In order to write several styles into a single XML file, use a single <span class="command"><strong>getstyle</strong></span> call and list all required styles as arguments. This will output the styles wrapped in a <code class="sgmltag-element">STYLESET</code> element, resulting in a valid XML file.</p></div></dd><dt><span class="term"><em class="replaceable"><code>style</code></em></span></dt><dd><p>All other arguments are interpreted as the names of bibliography styles.</p></dd></dl></div></div><div class="refsect3"><a id="refdba-getstyle-example"></a><h4>Example</h4><pre class="screen">
	  <code class="prompt">refdba: </code>
	  <strong class="userinput"><code>getstyle -o j.biol.chem.xml J.Biol.Chem.</code></strong>
	</pre><p>This will write the style specification stored under the style name "J.Biol.Chem." to the file <code class="filename">j.biol.chem.xml</code>.</p></div></div><div class="refsect2"><a id="app-a-command-help"></a><h3>help</h3><div class="refsect3"><a id="refdba-help-synopsis"></a><h4>Synopsis</h4><div class="cmdsynopsis"><p><code class="command">help</code> </p></div><div class="cmdsynopsis"><p><code class="command">?</code> </p></div></div><div class="refsect3"><a id="refdba-help-description"></a><h4>Description</h4><p>Displays a brief summary of the available commands.</p></div><div class="refsect3"><a id="refdba-help-example"></a><h4>Example</h4><pre class="screen">
	  <code class="prompt">refdba: </code>
	  <strong class="userinput"><code>help</code></strong>
	</pre></div></div><div class="refsect2"><a id="app-a-command-listdb"></a><h3>listdb</h3><div class="refsect3"><a id="refdba-listdb-synopsis"></a><h4>Synopsis</h4><div class="cmdsynopsis"><p><code class="command">listdb</code>  [<code class="option">-h</code>] [<em class="replaceable"><code>database-regexp</code></em>]</p></div></div><div class="refsect3"><a id="refdba-listdb-description"></a><h4>Description</h4><p>Lists all available databases if no argument is specified. If <em class="replaceable"><code>database-regexp</code></em> is specified, only the databases matching this expression will be listed.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>In order to tell refdb reference databases apart from other databases maintained by your database server, refdbd has to peek into each database returned by the database server. Depending on the number of available databases this may take some time. Therefore it may be a good idea to use a common prefix for all refdb databases as explained in the section about the <a class="link" href="re06.html#app-a-command-createdb" title="createdb"><span class="command"><strong>createdb</strong></span></a> command.</p></div></div><div class="refsect3"><a id="refdba-listdb-options"></a><h4>Options</h4><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-h</code></span></dt><dd><p>Displays a help message explaining the <span class="command"><strong>listdb</strong></span> command.</p></dd><dt><span class="term"><em class="replaceable"><code>database-regexp</code></em></span></dt><dd><p>A valid <a class="link" href="ch14s05.html#sect2-regular-expressions-sql" title="SQL regular expressions">SQL regular expression which limits the output to matching database names.</a>
	      </p></dd></dl></div></div><div class="refsect3"><a id="refdba-listdb-example"></a><h4>Example</h4><pre class="screen">
	  <code class="prompt">refdba: </code>
	  <strong class="userinput"><code>listdb <em class="replaceable"><code>db%</code></em></code></strong>
	</pre><p>This will list all databases with names that start with the string <span class="quote"><span class="quote">db</span></span>.</p></div></div><div class="refsect2"><a id="app-a-command-liststyle"></a><h3>liststyle</h3><div class="refsect3"><a id="refdba-liststyle-synopsis"></a><h4>Synopsis</h4><div class="cmdsynopsis"><p><code class="command">liststyle</code>  [<code class="option">-h</code>] [
	    <em class="replaceable"><code>style-regexp</code></em>
	  ]</p></div></div><div class="refsect3"><a id="refdba-liststyle-description"></a><h4>Description</h4><p>Lists all available bibliography styles that match <em class="replaceable"><code>style-regexp</code></em>. If no argument is given, <span class="emphasis"><em>all</em></span> available styles will be listed. This may or may not be what you want.</p></div><div class="refsect3"><a id="refdba-liststyle-options"></a><h4>Options</h4><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-h</code></span></dt><dd><p>Displays a help message explaining the <span class="command"><strong>listdb</strong></span> command.</p></dd><dt><span class="term"><em class="replaceable"><code>style-regexp</code></em></span></dt><dd><p>A valid <a class="link" href="ch14s05.html#sect2-regular-expressions-unix" title="Unix-style regular expressions">Unix regular expression</a> which limits the output to matching style names.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Some database engines, like SQLite, do not support <a class="link" href="ch14s05.html#sect2-regular-expressions-unix" title="Unix-style regular expressions">Unix-style regular expressions</a>. Use <a class="link" href="ch14s05.html#sect2-regular-expressions-sql" title="SQL regular expressions">SQL regular expressions</a> instead.</p></div></dd></dl></div></div><div class="refsect3"><a id="refdba-liststyle-example"></a><h4>Example</h4><pre class="screen">
	  <code class="prompt">refdba: </code>
	  <strong class="userinput"><code>liststyle <em class="replaceable"><code>^J.*</code></em></code></strong>
	</pre><p>This will list all bibliography styles that start with a capital <span class="quote"><span class="quote">J</span></span>.</p></div></div><div class="refsect2"><a id="app-a-command-listuser"></a><h3>listuser</h3><div class="refsect3"><a id="refdba-listuser-synopsis"></a><h4>Synopsis</h4><div class="cmdsynopsis"><p><code class="command">listuser</code>  {-d <em class="replaceable"><code>database</code></em>} [<code class="option">-h</code>] [<em class="replaceable"><code>name-regexp</code></em>]</p></div></div><div class="refsect3"><a id="refdba-listuser-description"></a><h4>Description</h4><p>Lists all available users of the specified database that match <em class="replaceable"><code>name-regexp</code></em>. If no argument is given, <span class="emphasis"><em>all</em></span> available users will be listed. This may or may not be what you want.</p></div><div class="refsect3"><a id="refdba-listuser-options"></a><h4>Options</h4><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-d</code> <em class="replaceable"><code>database</code></em></span></dt><dd><p>Specify the database name.</p></dd><dt><span class="term"><code class="option">-h</code></span></dt><dd><p>Displays a help message explaining the <span class="command"><strong>listdb</strong></span> command.</p></dd><dt><span class="term"><em class="replaceable"><code>name-regexp</code></em></span></dt><dd><p>A valid <a class="link" href="ch14s05.html#sect2-regular-expressions-unix" title="Unix-style regular expressions">Unix regular expression</a> which limits the output to matching database user names.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Some database engines, like SQLite, do not support Unix-style regular expressions. Use SQL regular expressions instead.</p></div></dd></dl></div></div><div class="refsect3"><a id="refdba-listuser-example"></a><h4>Example</h4><pre class="screen">
	  <code class="prompt">refdba: </code>
	  <strong class="userinput"><code>listuser <code class="option">-d</code> <em class="replaceable"><code>refs</code></em> <em class="replaceable"><code>^mo.*</code></em></code></strong>
	</pre><p>This will list all users of the database "refs" whose names start with <span class="quote"><span class="quote">mo</span></span>.</p></div></div><div class="refsect2"><a id="app-a-command-listword"></a><h3>listword</h3><div class="refsect3"><a id="refdba-listword-synopsis"></a><h4>Synopsis</h4><div class="cmdsynopsis"><p><code class="command">listword</code>  [<code class="option">-h</code>] {<em class="replaceable"><code>word-regexp</code></em>}</p></div></div><div class="refsect3"><a id="refdba-listword-description"></a><h4>Description</h4><p>Lists all available reserved journal words that match <em class="replaceable"><code>unix-regexp</code></em>. If no argument is given, <span class="emphasis"><em>all</em></span> available words will be listed. This may or may not be what you want.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Keep in mind that the journal words are uppercased internally. You should write your <em class="replaceable"><code>unix-regexp</code></em> using all caps accordingly.</p></div></div><div class="refsect3"><a id="refdba-listword-options"></a><h4>Options</h4><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-h</code></span></dt><dd><p>Displays a help message explaining the <span class="command"><strong>listdb</strong></span> command.</p></dd><dt><span class="term"><em class="replaceable"><code>word-regexp</code></em></span></dt><dd><p>A valid <a class="link" href="ch14s05.html#sect2-regular-expressions-unix" title="Unix-style regular expressions">Unix regular expression</a> which limits the output to matching journal title words. </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Some database engines, like SQLite, do not support Unix-style regular expressions. Use SQL regular expressions instead.</p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>For a brief description of the purpose of reserved words, see the <a class="link" href="re06.html#app-a-command-addword" title="addword"><span class="command"><strong>addword</strong></span></a> command.</p></div></dd></dl></div></div><div class="refsect3"><a id="refdba-listword-example"></a><h4>Example</h4><pre class="screen">
	  <code class="prompt">refdba: </code>
	  <strong class="userinput"><code>listword <em class="replaceable"><code>^BIO.*</code></em></code></strong>
	</pre><p>This will list all reserved journal words that start with <span class="quote"><span class="quote">BIO</span></span>.</p></div></div><div class="refsect2"><a id="app-a-command-scankw"></a><h3>scankw</h3><div class="refsect3"><a id="refdba-scankw-synopsis"></a><h4>Synopsis</h4><div class="cmdsynopsis"><p><code class="command">scankw</code>  {<code class="option">-d</code> <em class="replaceable"><code>database</code></em>} [<code class="option">-h</code>]</p></div></div><div class="refsect3"><a id="refdba-scankw-description"></a><h4>Description</h4><p>This command schedules a full keyword scan in the database specified with the <code class="option">-d</code> option. The abstract field as well as all title fields of all references found in the database are scanned for the presence of all keywords available in the database. If a match is found and the keyword is not yet associated with that reference, the keyword is added to that reference. As the time required to perform this operation increases with both the number of references and the number of keywords, the keyword scan is performed in the background and the command returns immediately on the client side. See the server log for the results.</p><p>As this command will cause a huge number of database accesses it is best scheduled to run automatically as a cron job at a time of low use, either nightly or on weekends.</p><p>Please note the difference between the full keyword scan and the automatic keyword scan which can be requested by the <a class="link" href="ch12.html" title="Chapter 12. The application server">refdbd</a> command line switch <code class="option">-K</code> or the corresponding <a class="link" href="re02.html#refdbd-configuration" title="Configuration">configuration variable</a> <code class="varname">keyword_scan</code>. The full keyword scan is "retrospective", i.e. it will add keywords that were added later to previously existing references. The automatic keyword scan will only add existing keywords to newly added references, thus causing less impact on the database performance while users are likely to access the database.</p></div><div class="refsect3"><a id="refdba-scankw-options"></a><h4>Options</h4><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-d</code> <em class="replaceable"><code>database</code></em></span></dt><dd><p>Specify the database name.</p></dd><dt><span class="term"><code class="option">-h</code></span></dt><dd><p>Displays a help message explaining the <span class="command"><strong>listdb</strong></span> command.</p></dd></dl></div></div></div><div class="refsect2"><a id="app-a-command-set"></a><h3>set</h3><div class="refsect3"><a id="refdba-set-synopsis"></a><h4>Synopsis</h4><div class="cmdsynopsis"><p><code class="command">set</code>  [<code class="option">-h</code>] [<em class="replaceable"><code>varname</code></em>] [<em class="replaceable"><code>varvalue</code></em>]</p></div></div><div class="refsect3"><a id="refdba-set-description"></a><h4>Description</h4><p>The <span class="command"><strong>set</strong></span> command displays or modifies the values of configuration variables.</p><p>If you call <span class="command"><strong>set</strong></span> without any arguments, it will display a list of all configuration variables with their current values.</p><p>If you call <span class="command"><strong>set</strong></span> with one argument, it will display the current value of this particular variable.</p><p>If you call <span class="command"><strong>set</strong></span> with two arguments, it will set the variable (first argument) to the new value (second argument) for the current session. To specify an empty value, use two quotation marks like this:"".</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>For obvious reasons, <span class="command"><strong>set</strong></span> will never display the current password although you can certainly change the password with this command. To make sure no one else sees the new password that you enter, run the command <span class="command"><strong>set passwd *</strong></span>. You will then be asked to enter a password which will not be echoed on the screen.</p><p>This command is not available in batch mode, use the command line switches instead. In the interactive mode, the changes to the configuration variables are limited to the current session. If you want to change the values permanently, you should rather edit one of the configuration files.</p></div></div><div class="refsect3"><a id="refdba-set-options"></a><h4>Options</h4><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-h</code></span></dt><dd><p>Displays a help message explaining the <span class="command"><strong>listdb</strong></span> command.</p></dd><dt><span class="term"><em class="replaceable"><code>varname</code></em></span></dt><dd><p>The name of the variable whose value should be displayed or set.</p></dd><dt><span class="term"><em class="replaceable"><code>varvalue</code></em></span></dt><dd><p>The new value of the variable to be set.</p></dd></dl></div></div><div class="refsect3"><a id="refdba-set-example"></a><h4>Example</h4><pre class="screen">
	  <code class="prompt">refdba: </code>
	  <strong class="userinput"><code>set timeout 90</code></strong>
	</pre><p>This command will set the timeout to 90 seconds for the current session.</p></div></div><div class="refsect2"><a id="app-a-command-verbose"></a><h3>verbose</h3><div class="refsect3"><a id="refdba-verbose-synopsis"></a><h4>Synopsis</h4><div class="cmdsynopsis"><p><code class="command">verbose</code>  [<code class="option">-h</code>]</p></div></div><div class="refsect3"><a id="refdba-verbose-description"></a><h4>Description</h4><p>Toggles the verbose mode on or off. If the verbose mode is on, the error messages and warnings may be some more comprehensible.</p></div><div class="refsect3"><a id="refdba-verbose-options"></a><h4>Options</h4><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-h</code></span></dt><dd><p>Displays a help message explaining the <span class="command"><strong>listdb</strong></span> command.</p></dd></dl></div></div><div class="refsect3"><a id="refdba-verbose-example"></a><h4>Example</h4><pre class="screen">
	  <code class="prompt">refdba: </code>
	  <strong class="userinput"><code>verbose</code></strong>
	</pre><p>Depending on the previous setting, this will toggle the verbose mode on or off.</p></div></div><div class="refsect2"><a id="app-a-command-viewstat"></a><h3>viewstat</h3><div class="refsect3"><a id="refdba-viewstat-synopsis"></a><h4>Synopsis</h4><div class="cmdsynopsis"><p><code class="command">viewstat</code>  [<code class="option">-h</code>]</p></div></div><div class="refsect3"><a id="refdba-viewstat-description"></a><h4>Description</h4><p>Shows the version numbers of the libdbi driver used to connect to your database server as well as the version information of that server. It also shows the current values of the variables that can be modified with <a class="link" href="re06.html#app-a-command-confserv" title="confserv"><span class="command"><strong>confserv</strong></span></a>.</p></div><div class="refsect3"><a id="refdba-viewstat-options"></a><h4>Options</h4><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-h</code></span></dt><dd><p>Displays a help message explaining the <span class="command"><strong>listdb</strong></span> command.</p></dd></dl></div></div><div class="refsect3"><a id="refdba-viewstat-example"></a><h4>Example</h4><pre class="screen">
	  <code class="prompt">refdba: </code>
	  <strong class="userinput"><code>viewstat</code></strong>
	</pre><p>This will print some connection statistics and informations on the screen.</p></div></div></div><div class="refsect1"><a id="refdba-files"></a><h2>Files</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="filename">PREFIX/etc/refdb/refdbarc</code></span></dt><dd><p>The global configuration file of refdba.</p></dd><dt><span class="term"><code class="filename">$HOME/.refdbarc</code></span></dt><dd><p>The user configuration file of refdba.</p></dd></dl></div></div><div class="refsect1"><a id="refdba-see_also"></a><h2>See also</h2><p><span class="emphasis"><em>RefDB</em></span> (7),
    <span class="emphasis"><em><a class="link" href="re02.html" title="refdbd">refdbd</a></em></span> (1), 
    <span class="emphasis"><em><a class="link" href="re07.html" title="refdb-backup">refdb-backup</a></em></span> (1), 
    <span class="emphasis"><em><a class="link" href="re08.html" title="refdb-restore">refdb-restore</a></em></span> (1), 
    <span class="emphasis"><em><a class="link" href="re11.html" title="refdbc">refdbc</a></em></span> (1).</p><p><span class="emphasis"><em>RefDB manual (local copy) </em></span> PREFIX/share/doc/refdb-&lt;version&gt;/refdb-manual/index.html</p><p><span class="emphasis"><em>RefDB manual (web) </em></span> &lt;<a class="ulink" href="http://refdb.sourceforge.net/manual/index.html" target="_top">http://refdb.sourceforge.net/manual/index.html</a>&gt;</p><p><span class="emphasis"><em>RefDB on the web </em></span> &lt;<a class="ulink" href="http://refdb.sourceforge.net/" target="_top">http://refdb.sourceforge.net/</a>&gt;</p></div><div class="refsect1"><a id="refdba-author"></a><h2>Author</h2><p>refdba was written by Markus Hoenicka &lt;markus@mhoenicka.de&gt;.</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch13.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch13.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="re07.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 13. Administration tools </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> refdb-backup</td></tr></table></div></body></html>