TCTMGR(1)
π TCTMGR(1) β the Tokyo Cabinet table-database command-line utility, bestie edition β¨
okay so this is tctmgr(1), from the Tokyo Cabinet fam β literally the CLI glow-up of the table database API. sit down, grab a strawberry drink π, and let's get into it.
π NAME π
tctmgr β the command line utility of the table database API. that's it, that's the vibe. π
πΈ DESCRIPTION πΈ
So tctmgr is a little utility for test and debugging of the table database API and the apps that live on top of it. no cap. π§
first, the little placeholder besties you're gonna keep seeing everywhere, so let's introduce them properly:
pathβ specifies the path of a database file. ποΈbnumβ specifies the number of buckets.apowβ specifies the power of the alignment.fpowβ specifies the power of the free block pool.pkeyβ specifies the primary key of a record. πcolsβ specifies the names and the values of a record alternately (name, value, name, valueβ¦ you get it).nameβ specifies the name of a column.opβ specifies an operator.exprβ specifies the condition expression.fileβ specifies the input file.
now the actual subcommands, and yes there are a lot of them, we're listing every single one π:
tctmgr create [-tl] [-td|-tb|-tt|-tx] path [bnum [apow [fpow]]]
Create a database file.
tctmgr inform [-nl|-nb] path
Print miscellaneous information to the standard output.
tctmgr put [-nl|-nb] [-sx] [-dk|-dc|-dai|-dad] path pkey [cols ...]
Store a record.
tctmgr out [-nl|-nb] [-sx] path pkey
Remove a record.
tctmgr get [-nl|-nb] [-sx] [-px] [-pz] path pkey
Print the value of a record.
tctmgr list [-nl|-nb] [-m num] [-pv] [-px] [-fm str] path
Print the primary keys of all records, separated by line feeds.
tctmgr search [-nl|-nb] [-ord name type] [-m num] [-sk num] [-kw] [-pv] [-px] [-ph] [-bt num] [-rm] [-ms type] path [name op expr ...]
Print records matching conditions, separated by line feeds.
tctmgr optimize [-tl] [-td|-tb|-tt|-tx] [-tz] [-nl|-nb] [-df] path [bnum [apow [fpow]]]
Optimize a database file.
tctmgr setindex [-nl|-nb] [-it type] path name
Set the index of a column.
tctmgr importtsv [-nl|-nb] [-sc] path [file]
Store records of TSV in each line of a file.
tctmgr version
Print the version information of Tokyo Cabinet.
like, look at that list. main character energy fr fr. π
β¨ Options feature the following β¨
every flag, every one, no skipping, we are not doing that to each other π«Ά:
-tlβ enable the optionTDBTLARGE.-tdβ enable the optionTDBTDEFLATE.-tbβ enable the optionTDBTBZIP.-ttβ enable the optionTDBTTCBS.-txβ enable the optionTDBTEXCODEC.-nlβ enable the optionTDBNOLCK.-nbβ enable the optionTDBLCKNB.-sxβ the input data is evaluated as a hexadecimal data string. π’-dkβ use the functiontctdbputkeepinstead oftctdbput.-dcβ use the functiontctdbputcatinstead oftctdbput.-daiβ use the functiontctdbaddintinstead oftctdbput.-dadβ use the functiontctdbadddoubleinstead oftctdbput.-pxβ the output data is converted into a hexadecimal data string.-pzβ do not append line feed at the end of the output. (petition to make this the default, honestly π)-m numβ specify the maximum number of the output.-pvβ print values of records also.-fm strβ specify the prefix of keys.-ord name typeβ specify the order of the result.-sk numβ specify the number of skipped records.-kwβ print KWIC string.-phβ print hint information also.-btβ specify the number of benchmark tests. β±οΈ-rmβ remove every record in the result. π (yes, every one. be so serious right now.)-ms typeβ specify the set operation of meta search.-tzβ enable the optionUINT8_MAX.-dfβ perform defragmentation only.-it typeβ specify the index type among"lexical","decimal","token","qgram", and"void".-scβ normalize keys as lower cases. π€
π¦ the search operators (iykyk) π¦
The operator of the search subcommand is one of "STREQ", "STRINC", "STRBW", "STREW", "STRAND", "STROR", "STROREQ", "STRRX", "NUMEQ", "NUMGT", "NUMGE", "NUMLT", "NUMLE", "NUMBT", "NUMOREQ", "FTSPH", "FTSAND", "FTSOR", and "FTSEX".
the little modifier hacks, listen up:
- If
"~"preposes each operator, the logical meaning is reversed. π - If
"+"preposes each operator, no index is used for the operator.
and the type-lists:
- The type of the
-ordoption is one of"STRASC","STRDESC","NUMASC", and"NUMDESC". - The type of the
-msoption is one of"UNION","ISECT", and"DIFF".
exit-status check, bestie: this command returns 0 on success, another on failure. that's the whole mood. β¨
π SEE ALSO π
go read these too, they're iconic in their own right: tcttest(1), tctmttest(1), tctdb(3), tokyocabinet(3)
and that's the page!! this one came straight out of the Tokyo Cabinet archives, dated 2012-08-18, filed under the manual page section β mwah, slay, periodt πππ¦
π¦ where this page comes from
- centos-stream 10: tokyocabinet 1.4.48-30.el10 Β· LGPL-2.1-or-later
- centos-stream 9: tokyocabinet 1.4.48-19.el9 Β· LGPLv2+
- centos-stream 9: tokyocabinet 1.4.48-19.el9 Β· LGPLv2+
- fedora 43: tokyocabinet 1.4.48-28.fc43 Β· LGPL-2.1-or-later
- fedora 43: tokyocabinet 1.4.48-28.fc43 Β· LGPL-2.1-or-later
- fedora 44: tokyocabinet 1.4.48-30.fc44 Β· LGPL-2.1-or-later
- fedora 44: tokyocabinet 1.4.48-30.fc44 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms