Difference between revisions of "Command-Line Options"
Line 290: | Line 290: | ||
==BaseX JAX-RX Server== | ==BaseX JAX-RX Server== | ||
− | ;Launch the server | + | ;Launch the JAX-RX server (deprecated from <font color='red'>Version 6.8</font>): |
<pre> | <pre> | ||
> basexjaxrx | > basexjaxrx | ||
Line 351: | Line 351: | ||
| <code>admin</code> | | <code>admin</code> | ||
| <code>-Uadmin</code> | | <code>-Uadmin</code> | ||
+ | |- valign="top" | ||
+ | | <code>-z</code> | ||
+ | | Do not generate [[Logging|log files]]. | ||
+ | | | ||
+ | |} | ||
+ | |||
+ | ==BaseX HTTP Server== | ||
+ | |||
+ | ;Launch the HTTP server (introduced with <font color='red'>Version 6.8</font>): | ||
+ | <pre> | ||
+ | > basexhttp | ||
+ | BaseX [Server] | ||
+ | Server was started. | ||
+ | 2011-01-02 03:04:05.600:INFO::Logging to STDERR via org.mortbay.log.StdErrLog | ||
+ | 2011-01-02 03:04:05.700:INFO::jetty-6.1.26 | ||
+ | 2011-01-02 03:04:05.800:INFO::Started SocketConnector@0.0.0.0:8984</pre> | ||
+ | |||
+ | Available command-line options can be listed with the <code>-h</code> flag: | ||
+ | <pre> | ||
+ | > basexhttp -h | ||
+ | BaseX [HTTP] | ||
+ | Usage: basexhttp [-cdeJhnpPsSUWz] [stop] | ||
+ | stop Stop existing server | ||
+ | -c Start in client/server mode | ||
+ | -d Activate debugging mode | ||
+ | -e<num> Set event port | ||
+ | -h<num> Set HTTP server port | ||
+ | -n<name> Set server (host) name | ||
+ | -p<num> Set database server port | ||
+ | -P<pass> Specify user password | ||
+ | -s Start database as service | ||
+ | -U<name> Specify user name | ||
+ | -W Deactivate WebDAV | ||
+ | -z Suppress logging | ||
+ | </pre> | ||
+ | |||
+ | The options have the following meaning: | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- valign="top" | ||
+ | ! width='70' | Flag | ||
+ | ! Description | ||
+ | ! Default | ||
+ | ! width='145' | Examples | ||
+ | |- valign="top" | ||
+ | | <code>stop</code> | ||
+ | | Stop an existing server instance. | ||
+ | | | ||
+ | | | ||
+ | |- valign="top" | ||
+ | | <code>-c</code> | ||
+ | | Starts the server in client mode, communicating with the server instance of BaseX. | ||
+ | | <code></code> | ||
+ | | <code></code> | ||
+ | |- valign="top" | ||
+ | | <code>-d</code> | ||
+ | | Turn on debugging. Debugging information is output to ''standard error''. | ||
+ | | | ||
+ | | | ||
+ | |- valign="top" | ||
+ | | <code>-e<num></code> | ||
+ | | Specify the port on which the server will send events to clients. | ||
+ | | <code>1985</code> | ||
+ | | <code>-e9998</code> | ||
+ | |- valign="top" | ||
+ | | <code>-h<num></code> | ||
+ | | The port on which the HTTP server will be addressable. This port is e.g. specified in the HTTP URLs. | ||
+ | | <code>8984</code> | ||
+ | | <code>-h9999</code> | ||
+ | |- valign="top" | ||
+ | | <code>-n<name></code> | ||
+ | | The server name on which the server is running. | ||
+ | | <code>localhost</code> | ||
+ | | <code>-nserver.basex.org</code> | ||
+ | |- valign="top" | ||
+ | | <code>-p<num></code> | ||
+ | | The port on which the BaseX Server will be addressable. | ||
+ | | <code>1984</code> | ||
+ | | <code>-p9998</code> | ||
+ | |- valign="top" | ||
+ | | <code>-P<pass></code> | ||
+ | | The user password, which will be used by the HTTP services to communicate with the BaseX Server. ''Warning'': when the password is specified on command-line, it may be visible to others. | ||
+ | | <code>admin</code> | ||
+ | | <code>-Uadmin -Padmin</code> | ||
+ | |- valign="top" | ||
+ | | <code>-R</code> | ||
+ | | Deactivates the REST service. | ||
+ | | | ||
+ | | | ||
+ | |- valign="top" | ||
+ | | <code>-s</code> | ||
+ | | Start the server as service (i.e., in the background). | ||
+ | | | ||
+ | | | ||
+ | |- valign="top" | ||
+ | | <code>-U<name></code> | ||
+ | | The user name, which will be used by the HTTP services to communicate with the BaseX Server. | ||
+ | | <code>admin</code> | ||
+ | | <code>-Uadmin</code> | ||
+ | |- valign="top" | ||
+ | | <code>-W</code> | ||
+ | | Deactivates the WebDAV service. | ||
+ | | | ||
+ | | | ||
|- valign="top" | |- valign="top" | ||
| <code>-z</code> | | <code>-z</code> |
Revision as of 15:33, 12 September 2011
This page gives details on the command-line options of all BaseX start scripts:
Contents
BaseX GUI
- Launch the GUI
> basexgui [file]
XML and XQuery files can be passed on as parameters. If an XML file is passed, a database instance is created from this file, or an existing database is opened. If an XQuery expression is passed on, it is opened in the XQuery editor.
BaseX Server
- Launch the server
> basexserver BaseX [Server] Server was started.
Available command-line options can be listed with the -h
flag:
> basexserver -h Usage: BaseXServer [-dpsz] [-c] [stop] stop Stop existing server -c<cmd> Execute initial database command(s) -d Activate debugging mode -e<num> Set event port -i Enter interactive mode -p<num> Set server port -s Start as service -z Suppress logging
The options have the following meaning:
Flag | Description | Default | Examples |
---|---|---|---|
stop
|
Stop an existing server instance; remaining input is ignored. | ||
-c<cmd>
|
Launch database commands before the server itself is started; all remaining text is interpreted as command input. Several commands can be separated by semicolons. | -c"open database;info"
| |
-d
|
Turn on debugging. Debugging information is output to standard error. | ||
-e<num>
|
Specify the port on which the server will send events to clients. | 1985
|
-e9998
|
-i
|
Interactively enter commands on the console, similar to standalone and client mode. | ||
-p<num>
|
Specify the port on which the server will be addressable. | 1984
|
-p9999
|
-s
|
Start the server as service (i.e., in background). | ||
-z
|
Do not generate log files. |
BaseX Client
- Launch the interactive mode
The user name and password will be requested. The default user/password combination is admin/admin:
> basexclient Username: admin Password: ***** BaseX [Client] Try "help" to get more information. > _
Available command-line options can be listed with the -h
flag:
> basexclient -h Usage: BaseXClient [-npPU] [-dosvVwz] [-cq] [file] [file] Execute XQuery file -c<cmd> Execute database command(s) -d Activate debugging mode -n<name> Set server (host) name -o<file> Write output to file -p<num> Set server port -P<pass> Specify user password -q<expr> Execute XQuery expression -s<pars> Set serialization parameter(s) -U<name> Specify user name -v/V Show (all) process info -w Retain whitespaces from source files -z Skip XQuery serialization
The options have the following meaning:
Flag | Description | Default | Examples |
---|---|---|---|
[file]
|
Execute the specified XQuery file. | ||
-b<pars>
|
Bind external variables to XQuery expressions. This flag may be specified multiple times; key/value pairs are separated by equality signs (= ).
|
-bv=example
| |
-c<cmd>
|
Launch database commands and skip interactive mode. The flag should be placed last, all remaining characters are interpreted as commands. Several commands can be separated by semicolons. | -c"list;info"
| |
-d
|
Turn on debugging. Debugging information is output to standard error. | ||
-n<name>
|
Specify the server name on which the server is running. | localhost
|
-nserver.basex.org
|
-o<file>
|
Command and query output is written to the specified file. | ||
-p<num>
|
Specify the port on which the server is running. | 1984
|
-p9999
|
-P<pass>
|
Specify the user password. Warning: when the password is specified on command-line, it may be visible to others. | -Uadmin -Padmin
| |
-q<expr>
|
Execute the specified string as XQuery expression. The flag should be placed last, as all remaining characters are interpreted as XQuery. | -q"doc('input')//head"
| |
-s<pars>
|
Specify parameters for serializing XQuery results; see Serialization for more details. This flag may be specified multiple times; key/value pairs are separated by equality signs (= ).
|
-smethod=text
| |
-U<name>
|
Specify the user name. | -Uadmin
| |
-v
|
Process information is written to standard output (STDOUT ).
|
||
-V
|
Detailed query information is written to standard output, including compilation and profiling steps. | ||
-w
|
By default, whitespaces around text nodes are chopped when a database is created. This flag can be specified to suppress chopping. | ||
-z
|
Skip the serialization of XQuery results. This flag is useful for analyzing query plans. |
BaseX Standalone
- Launch the interactive mode
> basex BaseX [Standalone] Try "help" to get more information. >_
Available command-line options can be listed with the -h
flag:
> basex -h Usage: BaseX [-diosuvVwz] [-cq] [file] [file] Execute XQuery file -b<pars> Bind external XQuery variables -c<cmd> Execute database command(s) -d Activate debugging mode -i<input> Open initial file or database -o<file> Write output to file -q<expr> Execute XQuery expression -s<pars> Set serialization parameter(s) -u Modifiy original files after updates -v/V Show (all) process info -w Retain whitespaces from source files -z Skip output of results
The options have the following meaning:
Flag | Description | Examples |
---|---|---|
[file]
|
Execute the specified XQuery file. | |
-b<pars>
|
Bind external variables to XQuery expressions. This flag may be specified multiple times; key/value pairs are separated by equality signs (= ).
|
-bv=example
|
-c<cmd>
|
Launch database commands and skip interactive mode. The flag should be placed last, as all remaining characters are interpreted as commands. Several commands can be separated by semicolons. | -c"list;info"
|
-d
|
Turn on debugging. Debugging information is output to standard error. | |
-i<input>
|
Open a database or XML document specified by the argument. The opened input may be further processed by an XQuery expression. | -iitems.xml -q"//item"
|
-o<file>
|
Command and query output is written to the specified file. |
|
-q<expr>
|
Execute the specified string as XQuery expression. The flag should be placed last, as all remaining characters are interpreted as XQuery. | -q"doc('input')//head"
|
-s<pars>
|
Specify parameters for serializing XQuery results; see Serialization for more details. This flag may be specified multiple times; key/value pairs are separated by equality signs (= ).
|
-smethod=text
|
-u
|
Modify original files after evaluating XQuery Update expressions. | |
-v
|
Process information is written to standard output. | |
-V
|
Detailed query information is written to standard output, including compilation and profiling steps. | |
-w
|
By default, whitespaces around text nodes are chopped when a database is created. This flag can be specified to suppress chopping. | |
-z
|
Skip the serialization of XQuery results. This flag is useful for analyzing query plans. |
BaseX JAX-RX Server
- Launch the JAX-RX server (deprecated from Version 6.8)
> basexjaxrx BaseX [Server] Server was started. 2011-01-02 03:04:05.600:INFO::Logging to STDERR via org.mortbay.log.StdErrLog 2011-01-02 03:04:05.700:INFO::jetty-6.1.25 2011-01-02 03:04:05.800:INFO::Started SocketConnector@0.0.0.0:8984
JAX-RX Server was started.
Available command-line options can be listed with the -h
flag:
> basexjaxrx -h Usage: JaxRxServer [-jpPsUz] -j<num> Set JAX-RX server port -p<num> Set database server port -P<pass> Specify user password -s Start as service -S<pars> Set serialization parameter(s) -U<name> Specify user name -z Suppress logging
The options have the following meaning:
Flag | Description | Default | Examples |
---|---|---|---|
-j<num>
|
The port on which the JAX-RX Server will be addressable. This port will be specified in the HTTP URLs. | 8984
|
-j9999
|
-p<num>
|
The port on which the BaseX Server will be addressable. | 1984
|
-p9998
|
-P<pass>
|
The user password, which will be used by JAX-RX to communicate with the BaseX Server. Warning: when the password is specified on command-line, it may be visible to others. | admin
|
-Uadmin -Padmin
|
-s
|
Start the server as service (i.e., in background). | ||
-S<pars>
|
Specify parameters for serializing XQuery results; see Serialization for more details. This flag may be specified multiple times; key/value pairs are separated by equality signs (= ).
|
-Sencoding=US-ASCII -Sindent=no
| |
-U<name>
|
The user name, which will be used by JAX-RX to communicate with the BaseX Server. | admin
|
-Uadmin
|
-z
|
Do not generate log files. |
BaseX HTTP Server
- Launch the HTTP server (introduced with Version 6.8)
> basexhttp BaseX [Server] Server was started. 2011-01-02 03:04:05.600:INFO::Logging to STDERR via org.mortbay.log.StdErrLog 2011-01-02 03:04:05.700:INFO::jetty-6.1.26 2011-01-02 03:04:05.800:INFO::Started SocketConnector@0.0.0.0:8984
Available command-line options can be listed with the -h
flag:
> basexhttp -h BaseX [HTTP] Usage: basexhttp [-cdeJhnpPsSUWz] [stop] stop Stop existing server -c Start in client/server mode -d Activate debugging mode -e<num> Set event port -h<num> Set HTTP server port -n<name> Set server (host) name -p<num> Set database server port -P<pass> Specify user password -s Start database as service -U<name> Specify user name -W Deactivate WebDAV -z Suppress logging
The options have the following meaning:
Flag | Description | Default | Examples |
---|---|---|---|
stop
|
Stop an existing server instance. | ||
-c
|
Starts the server in client mode, communicating with the server instance of BaseX. |
|
|
-d
|
Turn on debugging. Debugging information is output to standard error. | ||
-e<num>
|
Specify the port on which the server will send events to clients. | 1985
|
-e9998
|
-h<num>
|
The port on which the HTTP server will be addressable. This port is e.g. specified in the HTTP URLs. | 8984
|
-h9999
|
-n<name>
|
The server name on which the server is running. | localhost
|
-nserver.basex.org
|
-p<num>
|
The port on which the BaseX Server will be addressable. | 1984
|
-p9998
|
-P<pass>
|
The user password, which will be used by the HTTP services to communicate with the BaseX Server. Warning: when the password is specified on command-line, it may be visible to others. | admin
|
-Uadmin -Padmin
|
-R
|
Deactivates the REST service. | ||
-s
|
Start the server as service (i.e., in the background). | ||
-U<name>
|
The user name, which will be used by the HTTP services to communicate with the BaseX Server. | admin
|
-Uadmin
|
-W
|
Deactivates the WebDAV service. | ||
-z
|
Do not generate log files. |