XDATA(1)                                                 XDATA(1)


NAME
       xdata - utilities for handling arbitrary key-value pairs

SYNOPSIS
       Common options: [ -h ] [ -t type ] [ -p path ]

       xdls [ -i ] [ -l ] [ -e ] [ key | /regexp/ ] ...

       xdget key

       xdput [ -r ] [ -c ] key

       xded [ -n ] key

       xdrm [ -i ] [ -e ] ( key | /regexp/ ) ...

       xdcp [ -f ] old-key new-key

       xdmv [ -f ] old-key new-key

       xdsync  [  -P  ]  [ -r rsh ] [ -x xdsync ] [ -v ] ( -s | [
       user@]host)


DESCRIPTION
       The xdata utilities provide an interface for accessing and
       reading  arbitrary  data stored as key-value pairs in GDBM
       databases. The data are stored along with timestamps which
       are  used  by  xdsync to synchronise xdata databases among
       groups of cooperating hosts.

       In addition to the utilities described here,  there  is  a
       perl(1)  interface to xdata, called Data::XData; this mod-
       ule is in the xdata distribution.

       Data are stored in files located in a number  of  possible
       directories,  given  by the environment variable XDPATH or
       by the -p command-line option.  Several different types of
       data can be stored; the type is an arbitrary string, which
       is given in the XDTYPE environment variable or by  the  -t
       command-line option.


COMMON OPTIONS
       -h     Print a brief usage summary.


       -p path
              Use  path to locate xdata databases, instead of the
              value of the XDPATH environment variable.  With  no
              arguments,   xdls   will  list  every  key  in  the
              database.


       -t type
              Use path to locate xdata databases, instead of  the
              value of the XDTYPE environment variable.


XDLS
       xdls  writes  a  list  of named keys, or keys matching the
       given regexps, to standard output. If no keys  or  regexps
       are  listed,  then xdls will list all keys in the selected
       database.  xdls exits successfully if any key is listed.


       -i     Names and  regular  expressions  will  match  case-
              insensitively.


       -l     The  size  and modification time of each key listed
              should be  printed,  in  a  format  reminiscent  of
              ls(1).


       -e     Show  internal  and metadata keys are shown instead
              of user keys.



XDGET
       xdget retrieves the datum named  key  from  the  database,
       emitting  it  on  standard output, exiting successfully if
       any data are retrieved.


XDPUT
       xdput inserts data from standard input into  the  database
       under  the given key, exiting successfully if the data are
       stored.


       -r     Replace an existing key, if one exists.


       -n     Create a new database (in this first element of the
              path) if none exists.


XDED
       xded  edits  the  data  associated  with the given key, by
       writing it to a temporary file and invoking an editor  (by
       default,  the value of the EDITOR environment variable, or
       /bin/vi) on it. xded exits successfully if  the  data  are
       edited.


       -n     Create  and edit a new blank datum if the named key
              does not exist.


XDRM
       xdrm removes the named keys, or keys  matching  the  given
       regexps,  from  the  database, exiting successfully if any
       key is deleted.


       -i     Names and  regular  expressions  will  match  case-
              insensitively.


       -e     Delete internal and metadata keys are shown instead
              of user keys. Use with caution.


XDCP
       xdcp copies the named old-key to new-key, exiting success-
       fully if the datum is copied.


       -f     Overwrite an existing new-key, if present.


XDMV
       xdmv  renames  the  named old-key to new-key, exiting suc-
       cessfully if the datum is renamed.


       -f     Overwrite an existing new-key, if present.


XDSYNC
       xdsync synchronises data in the given  database  with  the
       database  of  the same type on host, optionally logging in
       as user.

       Because synchronisation relies upon the use  of  timestamp
       information in the database, xdsync will abort if the time
       on the remote machine  differs  from  that  on  the  local
       machine by a certain margin, by default 60 seconds.

       xdsync  exits  successfully if the synchronisation process
       completes without error.


       -P     The local xdata path will be passed to  the  remote
              machine;  this may well be inappropriate, but could
              be useful if the remote machine is running a broken
              shell.


       -r rsh Specifies  the  program  to  be used to contact the
              remote host,  by  default,  `/usr/bin/rsh'  If  the
              environment variable XDRSH is set, it will override
              this value.


       -x xdsync
              Specifies the name under which to  call  xdsync  on
              the remote host, by default `xdsync'


       -v     Be verbose.


       -s     Slave mode (internal use only).


BUGS
       See the source code.


FILES
       Stored  under  the  paths  given in the XDPATH environment
       variable.


SEE ALSO
       gdbm(3), perl(1), Data::XData(3), vi(1),
       http://www.ex-parrot.com/~chris/xdata/, README  and  other
       files in the xdata distribution.


AUTHOR
       Chris Lightfoot <chris@ex-parrot.com>


COPYING
       This  program  is  free  software; you can redistribute it
       and/or modify it under the terms of the GNU General Public
       License  as  published  by  the  Free Software Foundation;
       either version 2 of the License, or (at your  option)  any
       later version.

       This  program  is  distributed in the hope that it will be
       useful, but WITHOUT ANY WARRANTY; without even the implied
       warranty  of  MERCHANTABILITY  or FITNESS FOR A PARTICULAR
       PURPOSE. See the  GNU  General  Public  License  for  more
       details.

       You  should have received a copy of the GNU General Public
       License along with this program; if not, write to the Free
       Software  Foundation,  Inc.,  675  Mass Ave, Cambridge, MA
       02139, USA.








                                                                1