term% cat index.txt CBT(1) General Commands Manual CBT(1)
NAME
cbt - btree utilities
SYNOPSIS
cbt creat name ...
cbt report name ...
cbt cat [ -R ] name ...
cbt squash name
cbt build [ -R ] name
cbt add [ -R ] name
cbt delete [ -R ] name
DESCRIPTION
A B-tree name corresponds to a pair of files named name.T and name.F.
Name.T contains an access tree, and name.F contains the data.
The creat version of the command creates empty B-trees.
The report version of the command scans each B-tree and reports how
many records it contains.
The cat version of the command scans the B-tree in key-sort order,
writing on its standard output. With no option, cat writes each key
followed by a tab, followed by the record, followed by a new-line. If
option -R (raw) is present, each key-record pair has the format
struct {
short keylen;
char key[keylen];
short reclen;
char rec[reclen];
};
Keys and records are not null-terminated and consecutive key-record
pairs are not separated by new-lines. Keys may be no longer than 127
bytes.
The squash version of the command compresses the access tree to minimal
size.
The build version of the command reads a sorted list of keys and
records from the standard input and fills the file with them. Input is
in the form produced by the corresponding cat option.
The add (delete) version of the command inserts (removes) records. In‐
put is in the form produced by the corresponding cat option. The
records may be unsorted. In newline-separated input only the keys must
be present.
EXAMPLE
sort "-t<tab>" -1 inputfile | cbt build btreefile
<tab> denotes a tab character
FILES
/usr/lib/btree/*
SEE ALSO
cbt(3)
CBT(1)