SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

BotDetect - Real-Time Bot Detection API
 
 

MAN page from Mandrake 10.X cdb-0.55-12mdk.i586.rpm

cdbmake

Section: User Commands (1)
Index 

NAME

cdbmake - create a constant database 

SYNOPSIS

cdbmakefiletemp 

DESCRIPTION

cdbmakereads a series of encoded records from its standard inputand writes a constant database tofile.

Records are indexed bykeys.A key is a string.fileis structured so that another program, starting from a key,can quickly find the relevant record.cdbmakeallows several records with the same key,although (1) most readers only take the first recordand (2)cdbmakeslows down somewhat if there are many records with the same key.Note thatcdbmakepreserves the order of records infile.

A record is encoded forcdbmakeas+klen,dlen:key->datafollowed by a newline.Hereklenis the number of bytes inkeyanddlenis the number of bytes indata.The end of data is indicated by an extra newline.For example:


   +3,5:one->Hello

   +3,7:two->Goodbye

   

keyanddatamay contain any characters, including colons, dashes, newlines, and nulls.

cdbmakeensures thatfileis updated atomically,so programs readingfilenever have to wait forcdbmaketo finish.It does this by first writing the database totempand then movingtempon top offile.Iftempalready exists,it is destroyed.The directories containingtempandfilemust be writable tocdbmake;they must also be on the same filesystem.

cdbmakealways makes sure thattempis safely written to disk before it replacesfile.If the input is in a bad format or ifcdbmakehas any trouble writingtempto disk,cdbmakecomplains and leavesfilealone.

Keys and data do not have to fit into memory,butcdbmakeneeds roughly 16 bytes of memory per record.A database cannot exceed 4 gigabytes.

fileis portable across machines. 

SEE ALSO

cdbdump(1),cdbget(1),cdbstats(1)


 

Index

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO

This document was created byman2html,using the manual pages.
 
ICM Bot detect detector