>_</pre>
Available command-line options can be listed with the <code>{{Mono|-h</code> }} flag:
<pre>
$ basex -h
! width='165' | Examples
|- valign="top"
| <code>{{Mono|[file]</code>}}
| Execute the specified XQuery file.
|
|- valign="top"
|- valign="top"
| <code>{{Mono|-b<pars></code>}}| Bind external variables to XQuery expressions. This flag may be specified multiple times; key/value pairs are separated by equality signs (<code>{{Mono|=</code>}}).| <code>{{Mono|-bv=example<br />-q"declare variable $v external; $v"</code>}}
|- valign="top"
| <code>{{Mono|-c<cmd></code>}}
| 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.
| <code>{{Mono|-c"list;info"</code>}}
|- valign="top"
| <code>{{Mono|-d</code>}}
| Turn on debugging. Debugging information is output to ''standard error''.
|
|- valign="top"
| <code>{{Mono|-i<input></code>}}
| Open a database or XML document specified by the argument. The opened input may be further processed by an XQuery expression.
| <code>{{Mono|-iitems.xml -q"//item"</code>}}
|- valign="top"
| <code>{{Mono|-o<file></code>}}
| Command and query output is written to the specified file.
| <code></code>{{Mono|}}
|- valign="top"
| <code>{{Mono|-q<expr></code>}}
| Execute the specified string as XQuery expression. The flag should be placed last, as all remaining characters are interpreted as XQuery.
| <code>{{Mono|-q"doc('input')//head"</code>}}
|- valign="top"
| <code>{{Mono|-s<pars></code>}}| 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 (<code>{{Mono|=</code>}}).| <code>{{Mono|-smethod=text</code>}}
|- valign="top"
| <code>{{Mono|-u</code>}}
| Modify original files after evaluating XQuery Update expressions.
|
|- valign="top"
| <code>{{Mono|-v</code>}}
| Process information is written to ''standard output''.
|
|- valign="top"
| <code>{{Mono|-V</code>}}
| Detailed query information is written to ''standard output'', including compilation and profiling steps.
|
|- valign="top"
| <code>{{Mono|-w</code>}}
| By default, whitespaces around text nodes are [[Options#CHOP|chopped]] when a database is created. This flag can be specified to preserve whitespaces.
|
|- valign="top"
| <code>{{Mono|-x</code>}}
| This flags turn on the output of the query execution plan, formatted in [[Options#XMLPLAN|XML]].
|
|- valign="top"
| <code>{{Mono|-z</code>}}
| Skip the serialization of XQuery results. This flag is useful for analyzing query plans.
|
</pre>
Available command-line options can be listed with the <code>{{Mono|-h</code> }} flag:
<pre>
$ basexserver -h
! width='165' | Examples
|- valign="top"
| <code>{{Mono|stop</code>}}
| Stop an existing server instance; remaining input is ignored.
|
|
|- valign="top"
| <code>{{Mono|-c<cmd></code>}}
| Launch database commands before the server itself is started; all remaining text is interpreted as command input. Several commands can be separated by semicolons.
|
| <code>{{Mono|-c"open database;info"</code>}}
|- valign="top"
| <code>{{Mono|-d</code>}}
| Turn on debugging. Debugging information is output to ''standard error''.
|
|
|- valign="top"
| <code>{{Mono|-e<num></code>}}
| Specify the port on which the server will send events to clients.
| <code>{{Mono|1985</code>}}| <code>{{Mono|-e9998</code>}}
|- valign="top"
| <code>{{Mono|-i</code>}}
| Interactively enter commands on the console, similar to standalone and client mode.
|
|
|- valign="top"
| <code>{{Mono|-p<num></code>}}
| Specify the port on which the server will be addressable.
| <code>{{Mono|1984</code>}}| <code>{{Mono|-p9999</code>}}
|- valign="top"
| <code>{{Mono|-S</code>}}| Starts the server as service (i.e., in the background). <font color='orangered'>{{Mark|Modified in {{Version|7.0.1}}</font>
|
|
|- valign="top"
| <code>{{Mono|-z</code>}}
| Do not generate [[Logging|log files]].
|
</pre>
Available command-line options can be listed with the <code>{{Mono|-h</code> }} flag:
<pre>
$ basexclient -h
! width='165' | Examples
|- valign="top"
| <code>{{Mono|[file]</code>}}
| Execute the specified XQuery file.
|
|
|- valign="top"
| <code>{{Mono|-b<pars></code>}}| Bind external variables to XQuery expressions. This flag may be specified multiple times; key/value pairs are separated by equality signs (<code>{{Mono|=</code>}}).
|
| <code>{{Mono|-bv=example<br />-q"declare variable $v external; $v"</code>}}
|- valign="top"
| <code>{{Mono|-c<cmd></code>}}
| 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.
|
| <code>{{Mono|-c"list;info"</code>}}
|- valign="top"
| <code>{{Mono|-d</code>}}
| Turn on debugging. Debugging information is output to ''standard error''.
|
|
|- valign="top"
| <code>{{Mono|-i<input></code>}}
| Open a database or XML document specified by the argument. The opened input may be further processed by an XQuery expression.
|
| <code>{{Mono|-iitems.xml -q"//item"</code>}}
|- valign="top"
| <code>{{Mono|-n<name></code>}}
| Specify the server name on which the server is running.
| <code>{{Mono|localhost</code>}}| <code>{{Mono|-nserver.basex.org</code>}}
|- valign="top"
| <code>{{Mono|-o<file></code>}}
| Command and query output is written to the specified file.
|
|
|- valign="top"
| <code>{{Mono|-p<num></code>}}
| Specify the port on which the server is running.
| <code>{{Mono|1984</code>}}| <code>{{Mono|-p9999</code>}}
|- valign="top"
| <code>{{Mono|-P<pass></code>}}
| Specify the user password. ''Warning'': when the password is specified on command-line, it may be visible to others.
|
| <code>{{Mono|-Uadmin -Padmin</code>}}
|- valign="top"
| <code>{{Mono|-q<expr></code>}}
| Execute the specified string as XQuery expression. The flag should be placed last, as all remaining characters are interpreted as XQuery.
|
| <code>{{Mono|-q"doc('input')//head"</code>}}
|- valign="top"
| <code>{{Mono|-s<pars></code>}}| 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 (<code>{{Mono|=</code>}}).
|
| <code>{{Mono|-smethod=text</code>}}
|- valign="top"
| <code>{{Mono|-U<name></code>}}
| Specify the user name.
|
| <code>{{Mono|-Uadmin</code>}}
|- valign="top"
| <code>{{Mono|-v</code>}}| Process information is written to standard output (<code>{{Mono|STDOUT</code>}}).
|
|
|- valign="top"
| <code>{{Mono|-V</code>}}
| Detailed query information is written to ''standard output'', including compilation and profiling steps.
|
|
|- valign="top"
| <code>{{Mono|-w</code>}}
| By default, whitespaces around text nodes are [[Options#CHOP|chopped]] when a database is created. This flag can be specified to suppress chopping.
|
|
|- valign="top"
| <code>{{Mono|-x</code>}}
| This flags turn on the output of the query execution plan, formatted in [[Options#XMLPLAN|XML]].
|
|
|- valign="top"
| <code>{{Mono|-z</code>}}
| Skip the serialization of XQuery results. This flag is useful for analyzing query plans.
|
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>{{Mono|-h</code> }} flag:
<pre>
$ basexhttp -h
! width='145' | Examples
|- valign="top"
| <code>{{Mono|stop</code>}}| Stop a running HTTP server. By default, the database server will be stopped as well, unless one of the flags <code>{{Mono|-c</code> }} or <code>{{Mono|-l</code> }} is specified.
|
|
|- valign="top"
| <code>{{Mono|-c</code>}}| Starts the server in ''client mode'', and sends all commands to a database server instance. <font color='orangered'>{{Mark|Introduced with {{Version|7.0.1}}</font>
|
|
|- valign="top"
| <code>{{Mono|-d</code>}}
| Turn on debugging. Debugging information is output to ''standard error''.
|
|
|- valign="top"
| <code>{{Mono|-e<num></code>}}
| Specify the port on which the server will send events to clients.
| <code>{{Mono|1985</code>}}| <code>{{Mono|-e9998</code>}}
|- valign="top"
| <code>{{Mono|-h<num></code>}}
| The port on which the HTTP server will be addressable. This port is e.g. specified in the HTTP URLs.
| <code>{{Mono|8984</code>}}| <code>{{Mono|-h9999</code>}}
|- valign="top"
| <code>{{Mono|-l</code>}}
| Starts the server in ''local mode'', and executes all commands in the embedded database context.
|
|
|- valign="top"
| <code>{{Mono|-n<name></code>}}
| The server name on which the server is running.
| <code>{{Mono|localhost</code>}}| <code>{{Mono|-nserver.basex.org</code>}}
|- valign="top"
| <code>{{Mono|-p<num></code>}}
| The port on which the BaseX Server will be addressable.
| <code>{{Mono|1984</code>}}| <code>{{Mono|-p9998</code>}}
|- valign="top"
| <code>{{Mono|-P<pass></code>}}
| The user password, which will be used by the HTTP services for opening a new session. ''Warning'': when the password is specified on command-line, it may be visible to others.
| <code>{{Mono|admin</code>}}| <code>{{Mono|-Uadmin -Padmin</code>}}
|- valign="top"
| <code>{{Mono|-R</code>}}
| Deactivates the REST service.
|
|
|- valign="top"
| <code>{{Mono|-s<num></code>}}| The port that will be used to stop the HTTP server. <font color='orangered'>{{Mark|Introduced with {{Version|7.0.1}}</font>
|
|
|- valign="top"
| <code>{{Mono|-S</code>}}| Starts the server as service (i.e., in the background). <font color='orangered'>{{Mark|Introduced with {{Version|7.0.1}}</font>
|
|
|- valign="top"
| <code>{{Mono|-U<name></code>}}
| The user name, which will be used by the HTTP services for opening a new session.
| <code>{{Mono|admin</code>}}| <code>{{Mono|-Uadmin</code>}}
|- valign="top"
| <code>{{Mono|-W</code>}}
| Deactivates the WebDAV service.
|
|
|- valign="top"
| <code>{{Mono|-z</code>}}
| Do not generate [[Logging|log files]].
|
Some options can also be triggered by setting the following system properties:
* <code>{{Mono|org.basex.user</code>}}: user name for opening new sessions* <code>{{Mono|org.basex.password</code>}}: user password for opening new sessions* <code>{{Mono|org.basex.mode</code> }} ({{Version|7.0.1}}): by default, the HTTP server also starts an instance of the database server. If the mode is set to <code>{{Mono|local</code>}}, an embedded database context is used for executing commands. If the mode is set to <code>{{Mono|client</code>}}, all commands are sent to an existing database server instance.
[[Category:Beginner]]