man(1) Manual page archive


     CBT(1)                                                     CBT(1)

     NAME
          cbt - btree utilities

     SYNOPSIS
          cbt creat name ...
          cbt report name ...
          cbt cat [ -R ] name ...
          cbt squash [ -odest ] name
          cbt build [ -R ] name
          cbt add [ -R ] name
          cbt delete [ -R ] name
          cbt look [ -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 con-
          tains 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 pre-
          sent, 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 255 bytes.

          The `squash' version of the command compresses the access
          tree to minimal size.  Option -o names the squashed database
          dest, leaving the original database unaltered.

          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 correspond-
          ing `cat' option.

          The `add' (delete, `look') version of the command inserts

     CBT(1)                                                     CBT(1)

          (removes, looks up) records.  Input (and output of `look')
          is in the form produced by the corresponding `cat' option.
          The records may be unsorted.  In newline-separated input,
          only the keys need be present.

     EXAMPLES
          sort '-t<tab>' +0 -1 inputfile | cbt build btreefile
               <tab> denotes a tab character

     FILES
          cbt(3)