Blob Blame History Raw
.TH "KCHASHMGR" 1 "2012-05-24" "Man Page" "Kyoto Cabinet"

.SH NAME
kchashmgr \- command line interface to manage the file hash database

.SH DESCRIPTION
.PP
The command `\fBkchashmgr\fR' is a utility for test and debugging of the file hash database and its applications.  `\fIpath\fR' specifies the path of a database file.  `\fIkey\fR' specifies the key of a record.  `\fIvalue\fR' specifies the value of a record.  `\fIfile\fR' specifies the input/output file.
.PP
.RS
.br
\fBkchashmgr create \fR[\fB\-otr\fR]\fB \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-apow \fInum\fB\fR]\fB \fR[\fB\-fpow \fInum\fB\fR]\fB \fR[\fB\-ts\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fIpath\fB\fR
.RS
Creates a database file.
.RE
.br
\fBkchashmgr inform \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-st\fR]\fB \fIpath\fB\fR
.RS
Prints status information.
.RE
.br
\fBkchashmgr set \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-add\fR|\fB\-app\fR|\fB\-rep\fR|\fB\-inci\fR|\fB\-incd\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fIkey\fB \fIvalue\fB\fR
.RS
Stores a record.
.RE
.br
\fBkchashmgr remove \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fIkey\fB\fR
.RS
Removes a record.
.RE
.br
\fBkchashmgr get \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-rm\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-px\fR]\fB \fR[\fB\-pz\fR]\fB \fIpath\fB \fIkey\fB\fR
.RS
Prints the value of a record.
.RE
.br
\fBkchashmgr list \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-max \fInum\fB\fR]\fB \fR[\fB\-rm\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-pv\fR]\fB \fR[\fB\-px\fR]\fB \fIpath\fB \fR[\fB\fIkey\fB\fR]\fB\fR
.RS
Prints keys of all records, separated by line feeds.
.RE
.br
\fBkchashmgr clear \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB\fR
.RS
Removes all records of a database.
.RE
.br
\fBkchashmgr import \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Imports records from a TSV file.
.RE
.br
\fBkchashmgr copy \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fIfile\fB\fR
.RS
Copies the whole database.
.RE
.br
\fBkchashmgr dump \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Dumps records into a snapshot file.
.RE
.br
\fBkchashmgr load \fR[\fB\-otr\fR]\fB \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Loads records from a snapshot file.
.RE
.br
\fBkchashmgr defrag \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB\fR
.RS
Performs defragmentation.
.RE
.br
\fBkchashmgr setbulk \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fIkey\fB \fIvalue\fB ...\fR
.RS
Store records at once.
.RE
.br
\fBkchashmgr removebulk \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fIkey\fB ...\fR
.RS
Remove records at once.
.RE
.br
\fBkchashmgr getbulk \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-px\fR]\fB \fIpath\fB \fIkey\fB ...\fR
.RS
Retrieve records at once.
.RE
.br
\fBkchashmgr check \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB\fR
.RS
Checks consistency.
.RE
.RE
.PP
Options feature the following.
.PP
.RS
\fB\-otr\fR : opens the database with the truncation option.
.br
\fB\-onl\fR : opens the database with the no locking option.
.br
\fB\-otl\fR : opens the database with the try locking option.
.br
\fB\-onr\fR : opens the database with the no auto repair option.
.br
\fB\-apow \fInum\fR\fR : specifies the power of the alignment of record size.
.br
\fB\-fpow \fInum\fR\fR : specifies the power of the capacity of the free block pool.
.br
\fB\-ts\fR : tunes the database with the small option.
.br
\fB\-tl\fR : tunes the database with the linear option.
.br
\fB\-tc\fR : tunes the database with the compression option.
.br
\fB\-bnum \fInum\fR\fR : specifies the number of buckets of the hash table.
.br
\fB\-st\fR : prints miscellaneous information.
.br
\fB\-add\fR : performs adding operation.
.br
\fB\-app\fR : performs appending operation.
.br
\fB\-rep\fR : performs replacing operation.
.br
\fB\-inci\fR : performs integer increment operation.
.br
\fB\-incd\fR : performs real number increment operation.
.br
\fB\-sx\fR : the input data is evaluated as a hexadecimal data string.
.br
\fB\-rm\fR : removes the record.
.br
\fB\-px\fR : the output data is converted into a hexadecimal data string.
.br
\fB\-pz\fR : does not append line feed at the end of the output.
.br
\fB\-max \fInum\fR\fR : specifies the maximum number of shown records.
.br
\fB\-pv\fR : prints values of records also.
.br
.RE
.PP
This command returns 0 on success, another on failure.

.SH SEE ALSO
.PP
.BR kchashtest (1)