TKRZW_DBM_UTIL(1)
π NAME π
okay so bestie, meet tkrzw_dbm_util β this is the manual page for tkrzw_dbm_util version 1.0.32, and it lives in the User Commands section. it's giving "swiss army knife for Tkrzw databases" and I'm obsessed π
β¨ DESCRIPTION β¨
tkrzw_dbm_util: DBM utilities of Tkrzw periodt π¦
π Usage:
each of these is a whole subcommand, and the vibe is: you say what you want, then you hand it a file. here we go, no cap:
tkrzw_dbm_util create [common_options] [tuning_options] [options] file
: Creates a database file. π±
tkrzw_dbm_util inspect [common_options] file [attr]
: Prints inspection of a database file. π
tkrzw_dbm_util get [common_options] file key
: Gets a record and prints it. π
tkrzw_dbm_util set [common_options] [options] file key
: Sets a record. βοΈ
tkrzw_dbm_util remove [common_options] file key
: Removes a record. ποΈ
tkrzw_dbm_util rekey [common_options] file old_key new_key
: Changes the key of a record. π
tkrzw_dbm_util list [common_options] file
: Lists up records and prints them. π
tkrzw_dbm_util rebuild [common_options] [tuning_options] file
: Rebuilds a database file for optimization. π οΈ
tkrzw_dbm_util restore [common_options] old_file [new_file]
: Restores a broken database file. π©Ή
tkrzw_dbm_util merge [common_options] dest_file src_files...
: Merges database files. π«±π«²
tkrzw_dbm_util export [common_options] [options] dbm_file rec_file
: Exports records to a flat record file. π€
tkrzw_dbm_util import [common_options] [options] dbm_file rec_file
: Imports records from a flat record file. π₯
π Common options:
these ones work basically everywhere, they're the group-chat regulars π
--dbmimpl β the name of a DBM implementation:auto,hash,tree,skip,tiny,baby,cache,stdhash,stdtree,poly,shard. (default:auto)--fileimpl β the name of a file implementation:mmap-para,mmap-atom,pos-para,pos-atom. (default:mmap-para)--no_waitβ fails if the file is locked by another process. like, no waiting around, it just says no π--no_lockβ omits file locking. π--sync_hardβ synchronizes the file physically when closing.--alloc_initnum β the initial allocation size. (default:1048576)--alloc_incnum β the allocation increment factor. (default:2.0)--block_sizenum β the block size of the positional access file. (default:1)--direct_ioβ enables the direct I/O option of the positional access file.--sync_ioβ enables the synchronous I/O option of the positional access file.--paddingβ enables padding at the end of the file.--pagecacheβ enables the mini page cache in the process.--multiβ callsxxxMultimethods forget,set, andremovesubcommands.
π Options for the create subcommand:
--truncateβ truncates an existing database file. > heads up bestie, "existing" is doing a lot of work in that sentence β it's cutting your current file down. know that before you type it π
π Options for the inspect subcommand:
--validateβ validates records. β
βοΈ Options for the set subcommand:
--no_overwriteβ fails if there's an existing record with the same key. no takebacks, no clobbering π«--appendstr β appends the value at the end after the given delimiter.--incrnum β increments the value with the given initial value.--reducerfunc β sets the reducer for the skip database:none,first,second,last,concat,concatnull,concattab,concatline,total. (default:none)
π Options for the rekey subcommand:
--no_overwriteβ fails if there's an existing record with the same key. same energy as above π
π Options for the list subcommand:
--movetype β type of movement:first,jump,jumplower,jumplowerinc,jumpupper,jumpupperinc. (default:first)--jump_keystr β specifies the jump key. (default: empty string)--itemsnum β the number of items to print. (default:10)--escapeβ C-style escape is applied to the TSV data.--keysβ prints keys only.
π οΈ Options for the rebuild subcommand:
--restoreβ skips broken records to restore a broken database. π©Ή
π©Ή Options for the restore subcommand:
--autostr β the restore mode automatically done:none,default,default-ns,sync,sync-ns. (default:none)--end_offsetβ the exclusive end offset of records to read. (default:-1)--classβ the class name given toPolyDBMorShardDBM.
π«±π«² Options for the merge subcommand:
--reducerfunc β sets the reducer for the skip database:none,first,second,last,concat,concatnull,concattab,concatline,total. (default:none)
π€π₯ Options for the export and import subcommands:
--tsvβ the record file is in TSV format instead of flat record.--escapeβ C-style escape/unescape is applied to the TSV data.--keysβ exports keys only.--ulognum β uses update logs based on the timestamp.--ulog_idsnum num β sets the server ID and the DBM index of update logs.
πΈ Tuning options for HashDBM:
--in_placeβ uses in-place rather than pre-defined ones.--appendβ uses appending rather than pre-defined ones.--record_crcnum β the record CRC mode:-1,0,8,16,32. (default:0or-1)--record_compstr β the record compression mode:default,none,zlib,zstd,lz4,lzma,rc4,aes. (default:noneordefault)--offset_widthnum β the width to represent the offset of records. (default:4or-1)--align_pownum β sets the power to align records. (default:3or-1)--bucketsnum β sets the number of buckets for hashing. (default:1048583or-1)--cipher_keystr β sets the encryption key for cipher compressors. (default: empty)
π¦ Tuning options for TreeDBM:
--in_placeβ uses in-place rather than pre-defined ones.--appendβ uses appending rather than pre-defined ones.--record_crcnum β the record CRC mode:-1,0,8,16,32. (default:0or-1)--record_compstr β the record compression mode:default,none,zlib,zstd,lz4,lzma,rc4,aes. (default:noneordefault)--offset_widthnum β the width to represent the offset of records. (default:4or-1)--align_pownum β sets the power to align records. (default:10or-1)--bucketsnum β sets the number of buckets for hashing. (default:131101or-1)--cipher_keystr β sets the encryption key for cipher compressors. (default: empty)--max_page_sizenum β sets the maximum size of a page. (default:8130or-1)--max_branchesnum β sets the maximum number of branches of inner nodes. (default:256or-1)--comparatorfunc β sets the key comparator:lex,lexcase,dec,hex,real,float. (default:lex)
π§ Tuning options for SkipDBM:
--offset_widthnum β the width to represent the offset of records. (default:4)--step_unitnum β sets the step unit of the skip list. (default:4)--max_levelnum β sets the maximum level of the skip list. (default:14)--sort_mem_sizenum β sets the memory size used for sorting. (default:268435456)--insert_in_orderβ inserts records in ascending order of the key.
π Options for PolyDBM and ShardDBM:
--paramsstr β sets the parameters in"key=value,key=value"format.
okay that's the whole page bestie, every single flag accounted for, nothing dropped, we ate and left no crumbs πβ¨
this has been tkrzw_dbm_util version 1.0.32, dated January 2025 β mwah, go forth and manage your databases, you main character π«ΆπΈπ
π¦ where this page comes from
- epel 10: tkrzw 1.0.32-2.el10_1 Β· Apache-2.0
- fedora 43: tkrzw 1.0.32-2.fc43 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms