cdbmake -- create a constant database from scratch
SYNOPSIS
cdbmake database tempfile
DESCRIPTION
cdbmake creates a new constant database from data read
from its standard input. Constant databases are portable
between different architectures.
Input Format
On its input, cdbmake reads a series of records of format
+keylen,valuelen:key->value
For example,
+3,9:foo->bar'n'baz
is a valid record. Each record is followed by a newline.
The end of records is indicated by and extra newline.
Keys and values can be binary data, and contain any char
acters.
Replacement Procedure
cdbmake reads the data and writes to temporary file temp
file, syncinc the writes when done. It then atomically
moves tempfile to database. This ensures database reading
needs no locking.
Files tempfile and database must reside on the same
filesystem, and the directories containing them must be
writable to the user invoking cdbmake.
Do not run two simultaneous cdbmakes with the same temp
file.
Memory Usage
cdbmake needs roughly 16 bytes of memory per record. Maxi
mum database size is 4 gigabytes.
RETURN VALUES
0 on success, 1 on syntax errors and 111 on transient
errors.
RESTRICTIONS
Identical keys are allowed and stored, but not all readers
support them.
cdbdump(1), cdbget(1), cdbstats(1)
Man(1) output converted with
man2html