Difference between revisions of "Command-Line Options"

From BaseX Documentation
Jump to navigation Jump to search
Line 1: Line 1:
 
This page gives an overview on all command-line options of the BaseX [[Startup Overview|Startup]] scripts:
 
This page gives an overview on all command-line options of the BaseX [[Startup Overview|Startup]] scripts:
 
==BaseX Standalone==
 
 
;Console command
 
:<code>
 
> basex
 
</code>
 
 
All available command-line flags can be listed by adding <code>-h</code> to the call:
 
:<code>
 
> basex -h
 
</code>
 
<pre>
 
Usage: BaseX [-diosuvVwz] [-cq] [file]
 
  [file]    Execute XQuery file
 
  -c<cmd>    Execute database command(s)
 
  -d        Activate debugging mode
 
  -i<file>  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        wrap query result to xml
 
  -z        Skip output of results
 
</pre>
 
  
 
==BaseX Server==
 
==BaseX Server==
Line 89: Line 63:
 
   -v/V      Show (all) process info
 
   -v/V      Show (all) process info
 
   -w        Keep whitespaces from source files
 
   -w        Keep whitespaces from source files
 +
  -z        Skip output of results
 +
</pre>
 +
 +
==BaseX Standalone==
 +
 +
;Console command
 +
:<code>
 +
> basex
 +
</code>
 +
 +
All available command-line flags can be listed by adding <code>-h</code> to the call:
 +
:<code>
 +
> basex -h
 +
</code>
 +
<pre>
 +
Usage: BaseX [-diosuvVwz] [-cq] [file]
 +
  [file]    Execute XQuery file
 +
  -c<cmd>    Execute database command(s)
 +
  -d        Activate debugging mode
 +
  -i<file>  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        wrap query result to xml
 
   -z        Skip output of results
 
   -z        Skip output of results
 
</pre>
 
</pre>
  
 
[[Category:Beginner]]
 
[[Category:Beginner]]

Revision as of 13:36, 17 January 2011

This page gives an overview on all command-line options of the BaseX Startup scripts:

BaseX Server

Console command

> basexserver

If the server has been succesfully started, this is coming up:

BaseX [Server]
Server was started.

All available command-line flags can be listed by adding -h to the call:

> basexserver -h

Usage: BaseXServer [-s] [-dpz] [-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

If you want to interact (execute commands, add databases, add users) with the server, start the server with the -i flag.

> basexserver -i

BaseX Client

Console command

> basexclient

Next, the user name and password has to be entered. By default, the user admin has admin as password:

Username: admin
Password:
> _

All available command-line flags can be listed by adding -h to the call:

> 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         Keep whitespaces from source files
  -z         Skip output of results

BaseX Standalone

Console command

> basex

All available command-line flags can be listed by adding -h to the call:

> basex -h

Usage: BaseX [-diosuvVwz] [-cq] [file]
  [file]     Execute XQuery file
  -c<cmd>    Execute database command(s)
  -d         Activate debugging mode
  -i<file>   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         wrap query result to xml
  -z         Skip output of results