CAUTION other exist functions related to building exist live in env/exist.bash
exist_url relative/path host
For the default host : “localhost” the port of the server is included in the URL, for other hosts the port is not specified.:
exist_url /servlet/db/ : $(exist_url /servlet/db/) exist_url /servlet/db/ $HEPREZ_SERVER : $(exist_url /servlet/db/ $HEPREZ_SERVER)The behaviour is due to the usual configuration of directing all remote access thru apache on :80
usage (no trailing slash):
exist_put /tmp/dummy.xml /db/here/in/a/deeeeep/folder
results in the dbpath /db/here/in/a/deeeeep/folder/dummy.xml
exist_rm <dbp> <host:localhost>
delete a resource or collection from the database CAUTION YOU CAN DELETE THE ENTIRE DB WITH THIS:
exist_rm /db/cache/hfagc/20080401/rez-classify-key.xml exist_rm /db/cache/hfagc/20080401/creditstakes more than a minute/ages? sometimes, suspect a timeout , but seemed to succeed,perhaps need:
--connect-timeout --max-time
exist_gett <dbp> <fsdir> <host:localhost> <port:9090>
GETs from database with modification time alignment to that of the database
exist_exists
exist_cq_ <desription of query to lookup in examples.xml>
exist_cq_ last modified files beneath /db/hfagc --host=cms01.phys.ntu.edu.tw exist_cq_ last --host=cms01.phys.ntu.edu.tw ## query with the 1st matching description is usedExample output:
{'{http://exist.sourceforge.net/NS/exist}start': '1', '{http://exist.sourceforge.net/NS/exist}count': '10', '{http://exist.sourceforge.net/NS/exist}hits': '218'} <activity><lastmod>2011-11-28T13:41:00.985+08:00</lastmod><name>belle_psiketac.xml</name><col>/db/hfagc/belle/andrzej</col><uri>/db/hfagc/belle/andrzej/belle_psiketac.xml</uri><base>/db/hfagc/belle/andrzej/belle_psiketac.xml</base></activity> <activity><lastmod>2011-11-24T10:21:28.461+08:00</lastmod><name>belle_bs_jpif0.xml</name><col>/db/hfagc/belle/andrzej</col><uri>/db/hfagc/belle/andrzej/belle_bs_jpif0.xml</uri><base>/db/hfagc/belle/andrzej/belle_bs_jpif0.xml</base></activity> <activity><lastmod>2011-11-23T08:00:33.718+08:00</lastmod><name>belle_DS1D.xml</name><col>/db/hfagc/belle/andrzej</col><uri>/db/hfagc/belle/andrzej/belle_DS1D.xml</uri><base>/db/hfagc/belle/andrzej/belle_DS1D.xml</base></activity>
exist_is_directly_accessible_
Checking accessibility of eXist XMLRPC port (the backdoor) using netcat Called by exist_is_directly_accessible, exist_assert_directly_accessible