TCBMGR(1)
π NAME π
tcbmgr β the command line utility of the B+ tree database API, straight out of Tokyo Cabinet π
β¨ DESCRIPTION β¨
okay so bestie, gather round, because tcbmgr is a utility for test and debugging of the B+ tree database API and its applications. she's not here to be your production queen, she's here to poke at things and tell you what's up. π¦
before we get into the commands, here's the cast of little placeholder cuties you're gonna see everywhere, so learn their names fr fr:
pathβ specifies the path of a database file.lmembβ specifies the number of members in each leaf page.nmembβ specifies the number of members in each non-leaf page.bnumβ specifies the number of buckets.apowβ specifies the power of the alignment.fpowβ specifies the power of the free block pool.keyβ specifies the key of a record.valueβ specifies the value of a record.fileβ specifies the input file.
π the subcommands, in all their glory π
tcbmgr create [-cd|-ci|-cj] [-tl] [-td|-tb|-tt|-tx] path [lmemb [nmemb [bnum [apow [fpow]]]]]β Create a database file. β¨tcbmgr inform [-nl|-nb] pathβ Print miscellaneous information to the standard output. she's a yapper, she tells you everything π¬tcbmgr put [-cd|-ci|-cj] [-nl|-nb] [-sx] [-dk|-dc|-dd|-db|-dai|-dad] path key valueβ Store a record. πΎtcbmgr out [-cd|-ci|-cj] [-nl|-nb] [-sx] path keyβ Remove a record. bye bestie πtcbmgr get [-cd|-ci|-cj] [-nl|-nb] [-sx] [-px] [-pz] path keyβ Print the value of a record. the moment of truth πtcbmgr list [-cd|-ci|-cj] [-nl|-nb] [-m num] [-bk] [-pv] [-px] [-j str] [-rb bkey ekey] [-fm str] pathβ Print keys of all records, separated by line feeds. the whole roster, one per line πtcbmgr optimize [-cd|-ci|-cj] [-tl] [-td|-tb|-tt|-tx] [-tz] [-nl|-nb] [-df] path [lmemb [nmemb [bnum [apow [fpow]]]]]β Optimize a database file. self-care for your database, periodt πtcbmgr importtsv [-nl|-nb] [-sc] path [file]β Store records of TSV in each line of a file. π₯tcbmgr versionβ Print the version information of Tokyo Cabinet. π·οΈ
π Options feature the following. π
-cdβ use the comparison functiontccmpdecimal.-ciβ use the comparison functiontccmpint32.-cjβ use the comparison functiontccmpint64.-tlβ enable the optionBDBTLARGE.-tdβ enable the optionBDBTDEFLATE.-tbβ enable the optionBDBTBZIP.-ttβ enable the optionBDBTTCBS.-txβ enable the optionBDBTEXCODEC.-nlβ enable the optionBDBNOLCK.-nbβ enable the optionBDBLCKNB.-sxβ the input data is evaluated as a hexadecimal data string. π’-dkβ use the functiontcbdbputkeepinstead oftcbdbput.-dcβ use the functiontcbdbputcatinstead oftcbdbput.-ddβ use the functiontcbdbputdupinstead oftcbdbput.-dbβ use the functiontcbdbputdupbackinstead oftcbdbput.-daiβ use the functiontcbdbaddintinstead oftcbdbput.-dadβ use the functiontcbdbadddoubleinstead oftcbdbput.-pxβ the output data is converted into a hexadecimal data string. π’-pzβ do not append line feed at the end of the output. no trailing newline, she's lowkey minimalist-m numβ specify the maximum number of the output.-bkβ perform backword scanning. (that spelling is literally what the source says, i'm just the messenger, no cap π«‘)-pvβ print values of records also.-j strβ specify the key where the cursor jump to.-rb bkey ekeyβ specify the range of keys.-fm strβ specify the prefix of keys.-tzβ enable the optionUINT8_MAX.-dfβ perform defragmentation only.-scβ normalize keys as lower cases.
heads up bestie: this command returns0on success, and another value on failure. so if you get a0, that's the slay. anything else? not the slay. π
πΈ SEE ALSO πΈ
tcbtest(1), tcbmttest(1), tcbdb(3), tokyocabinet(3) β go read those too, they're iconic π
and that's the whole page, babe π«Ά this one lives in the Tokyo Cabinet manual set, dated 2012-08-18, and yeah she's a little vintage but she still ate. go forth and debug. πβ¨
π¦ 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+
- debian bookworm: tokyocabinet-bin 1.4.48-15 Β· LGPL-2.1-or-later
- debian trixie: tokyocabinet-bin 1.4.48-15.1+b1 Β· LGPL-2.1-or-later
- 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
- nixos 26.05: tokyocabinet 1.4.48
- nixpkgs unstable: tokyocabinet 1.4.48
- ubuntu jammy: tokyocabinet-bin 1.4.48-14build1 Β· LGPL-2.1-or-later
- ubuntu noble: tokyocabinet-bin 1.4.48-15.1build1 Β· LGPL-2.1-or-later
- ubuntu questing: tokyocabinet-bin 1.4.48-15.1build2
- ubuntu resolute: tokyocabinet-bin 1.4.48-15.1build3 Β· LGPL-2.1-or-later
- ubuntu stonking: tokyocabinet-bin 1.4.48-15.1build3 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms