Difference between revisions of "Command-Line Options"
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
==BaseX Server== | ==BaseX Server== | ||
− | ; | + | ;Launch the server |
− | + | <pre> | |
> basexserver | > basexserver | ||
− | + | BaseX [Server] | |
− | |||
− | |||
− | |||
Server was started.</pre> | Server was started.</pre> | ||
− | + | Available command-line options can be listed with the <code>-h</code> flag: | |
− | + | <pre> | |
> basexserver -h | > basexserver -h | ||
− | |||
− | |||
Usage: BaseXServer [-dpsz] [-c] [stop] | Usage: BaseXServer [-dpsz] [-c] [stop] | ||
stop Stop existing server | stop Stop existing server | ||
Line 27: | Line 22: | ||
</pre> | </pre> | ||
− | The | + | The options have the following meaning: |
{| class="wikitable" | {| class="wikitable" | ||
Line 52: | Line 47: | ||
|- valign="top" | |- valign="top" | ||
| <code>-p<num></code> | | <code>-p<num></code> | ||
− | | Specify the port on which the server | + | | Specify the port on which the server will be addressable. |
| <code>-p9999</code> | | <code>-p9999</code> | ||
|- valign="top" | |- valign="top" | ||
Line 67: | Line 62: | ||
;Launch interactive mode | ;Launch interactive mode | ||
− | :< | + | |
+ | The user name and password will be requested. The default user/password combination is '''admin'''/'''admin''': | ||
+ | <pre> | ||
> basexclient | > basexclient | ||
− | + | Username: admin | |
− | |||
− | |||
− | |||
− | |||
Password: | Password: | ||
− | > _</pre> | + | > _ |
+ | </pre> | ||
− | Available command-line | + | Available command-line options can be listed with the <code>-h</code> flag: |
− | + | <pre> | |
> basexclient -h | > basexclient -h | ||
− | |||
− | |||
Usage: BaseXClient [-npPU] [-dovVwz] [-cq] [file] | Usage: BaseXClient [-npPU] [-dovVwz] [-cq] [file] | ||
[file] Execute XQuery file | [file] Execute XQuery file | ||
Line 97: | Line 89: | ||
</pre> | </pre> | ||
− | The | + | The options have the following meaning: |
{| class="wikitable" | {| class="wikitable" | ||
Line 161: | Line 153: | ||
;Launch the interactive mode: | ;Launch the interactive mode: | ||
− | + | <pre> | |
> basex | > basex | ||
− | </ | + | BaseX [Standalone] |
+ | Try "help" to get more information. | ||
+ | >_</pre> | ||
Available command-line options can be listed with the <code>-h</code> flag: | Available command-line options can be listed with the <code>-h</code> flag: | ||
− | + | <pre> | |
> basex -h | > basex -h | ||
− | |||
− | |||
Usage: BaseX [-diosuvVwz] [-cq] [file] | Usage: BaseX [-diosuvVwz] [-cq] [file] | ||
[file] Execute XQuery file | [file] Execute XQuery file | ||
Line 184: | Line 176: | ||
</pre> | </pre> | ||
− | The | + | The options have the following meaning: |
{| class="wikitable" | {| class="wikitable" | ||
Line 244: | Line 236: | ||
;Launch the JAX-RX server | ;Launch the JAX-RX server | ||
− | + | <pre> | |
> basexrest | > basexrest | ||
− | </ | + | Starting REST server on port 8984... |
+ | 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</pre> | ||
Available command-line options can be listed with the <code>-h</code> flag: | Available command-line options can be listed with the <code>-h</code> flag: | ||
− | + | <pre> | |
> basex -h | > basex -h | ||
− | |||
− | |||
Usage: JaxRxServer [-pPrsUz] | Usage: JaxRxServer [-pPrsUz] | ||
-p<num> Set database server port | -p<num> Set database server port | ||
Line 269: | Line 264: | ||
! Description | ! Description | ||
! width='165' | Examples | ! width='165' | Examples | ||
+ | |- valign="top" | ||
+ | | <code>-p<num></code> | ||
+ | | The port on which the BaseX Server will be addressable. The default port is '''1984'''. | ||
+ | | <code>-p9998</code> | ||
+ | |- valign="top" | ||
+ | | <code>-r<num></code> | ||
+ | | The port on which the REST Server will be addressable. This port will be specified in the REST URLs (default: <code>8984</code>). The default port is '''8984'''. | ||
+ | | <code>-r9999</code> | ||
+ | |- valign="top" | ||
+ | | <code>-P<pass></code> | ||
+ | | The user password, which will be used by JAX-RX to communicate with the BaseX Server. The default password is '''admin'''. ''Warning'': when the password is specified on command-line, it may be visible to others. | ||
+ | | <code>-Uadmin -Padmin</code> | ||
+ | |- valign="top" | ||
+ | | <code>-s<pars></code> | ||
+ | | Specify parameters for serializing XQuery results, as specified in the [http://www.w3.org/TR/xslt-xquery-serialization/ W3C XQuery Serialization] document. Key/value pairs are separated by equality signs (<code>=</code>). | ||
+ | | <code>-sencoding=US-ASCII</code> | ||
+ | |- valign="top" | ||
+ | | <code>-U<name></code> | ||
+ | | The user name, which will be used by JAX-RX to communicate with the BaseX Server. The default user is '''admin'''. | ||
+ | | <code>-Uadmin -Padmin</code> | ||
+ | |- valign="top" | ||
+ | | <code>-z</code> | ||
+ | | Do not generate [[Logging|log files]]. | ||
+ | | | ||
|} | |} | ||
[[Category:Beginner]] | [[Category:Beginner]] |
Revision as of 22:39, 23 January 2011
This page gives an overview on all command-line options of the BaseX Startup scripts:
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 -i Enter interactive mode -p<num> Set server port -s Start as service -z Suppress logging
The options have the following meaning:
Flag | Description | 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 (STDERR ).
|
|
-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. | -p9999
|
-s
|
Start the server as service (i.e., in background). | |
-z
|
Do not generate log files. |
BaseX Client
- Launch interactive mode
The user name and password will be requested. The default user/password combination is admin/admin:
> basexclient Username: admin Password: > _
Available command-line options can be listed with the -h
flag:
> basexclient -h Usage: BaseXClient [-npPU] [-dovVwz] [-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 -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 | Examples |
---|---|---|
[file]
|
Execute the specified XQuery file. | |
-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 (STDERR ).
|
|
-n<name>
|
Specify the server name on which the server is running. | -nserver.basex.org
|
-o<file>
|
Command and query output is written to the specified file. | -p9999
|
-p<num>
|
Specify the port on which the server is running. | -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"
|
-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 (STDOUT ), 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 may be 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 -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. | |
-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. | -p9999
|
-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, as specified in the W3C XQuery Serialization document. 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 may be useful for analyzing query plans. |
BaseX REST
- Launch the JAX-RX server
> basexrest Starting REST server on port 8984... 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
Available command-line options can be listed with the -h
flag:
> basex -h Usage: JaxRxServer [-pPrsUz] -p<num> Set database server port -P<pass> Specify user password -r<num> Set REST server port -s<pars> Set serialization parameter(s) -U<name> Specify user name -z Suppress logging
The options have the following meaning:
Flag | Description | Examples |
---|---|---|
-p<num>
|
The port on which the BaseX Server will be addressable. The default port is 1984. | -p9998
|
-r<num>
|
The port on which the REST Server will be addressable. This port will be specified in the REST URLs (default: 8984 ). The default port is 8984.
|
-r9999
|
-P<pass>
|
The user password, which will be used by JAX-RX to communicate with the BaseX Server. The default password is admin. Warning: when the password is specified on command-line, it may be visible to others. | -Uadmin -Padmin
|
-s<pars>
|
Specify parameters for serializing XQuery results, as specified in the W3C XQuery Serialization document. Key/value pairs are separated by equality signs (= ).
|
-sencoding=US-ASCII
|
-U<name>
|
The user name, which will be used by JAX-RX to communicate with the BaseX Server. The default user is admin. | -Uadmin -Padmin
|
-z
|
Do not generate log files. |