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)
In addition to the utilities described here, there is a perl(1) interface to xdata, called Data::XData; this module 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.
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.
xdget retrieves the datum named key from the database, emitting it on standard output, exiting successfully if any data are retrieved.
xdput inserts data from standard input into the database under the given key, exiting successfully if the data are stored.
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.
xdrm removes the named keys, or keys matching the given regexps, from the database, exiting successfully if any key is deleted.
xdcp copies the named old-key to new-key, exiting successfully if the datum is copied.
xdmv renames the named old-key to new-key, exiting successfully if the datum is renamed.
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.
See the source code.
Stored under the paths given in the XDPATH environment variable.
gdbm(3)
, perl(1)
, Data::XData(3)
,
vi(1)
,
http://www.ex-parrot.com/~chris/xdata/,
README and other files in the xdata
distribution.
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.