TCHMGR(1)

๐Ÿ’– TCHMGR(1) ๐Ÿ’–

okay bestie, welcome to tchmgr โ€” the command line utility of the hash database API, straight out of Tokyo Cabinet. it's giving tiny but powerful, fr fr. let's get into it โœจ


๐ŸŒธ NAME ๐ŸŒธ

tchmgr โ€” the command line utility of the hash database API ๐Ÿซถ


โœจ DESCRIPTION โœจ

so like, the command tchmgr is a utility for test and debugging of the hash database API and its applications. no cap, that's literally its whole job.

here's the cast of placeholders you're gonna see everywhere, so memorize these iykyk:

  • path โ€” the path of a database file ๐Ÿ“
  • bnum โ€” the number of buckets ๐Ÿชฃ
  • apow โ€” the power of the alignment ๐Ÿ“
  • fpow โ€” the power of the free block pool ๐ŸŠ
  • key โ€” the key of a record ๐Ÿ”‘
  • value โ€” the value of a record ๐Ÿ’Ž
  • file โ€” the input file ๐Ÿ“„

and here's the whole menu of subcommands, each one a lil icon in its own right:

tchmgr create [-tl] [-td|-tb|-tt|-tx] path [bnum [apow [fpow]]]
       Create a database file.
tchmgr inform [-nl|-nb] path
       Print miscellaneous information to the standard output.
tchmgr put [-nl|-nb] [-sx] [-dk|-dc|-dai|-dad] path key value
       Store a record.
tchmgr out [-nl|-nb] [-sx] path key
       Remove a record.
tchmgr get [-nl|-nb] [-sx] [-px] [-pz] path key
       Print the value of a record.
tchmgr list [-nl|-nb] [-m num] [-pv] [-px] [-fm str] path
       Print keys of all records, separated by line feeds.
tchmgr optimize [-tl] [-td|-tb|-tt|-tx] [-tz] [-nl|-nb] [-df]
path [bnum [apow [fpow]]]
       Optimize a database file.
tchmgr importtsv [-nl|-nb] [-sc] path [file]
       Store records of TSV in each line of a file.
tchmgr version
       Print the version information of Tokyo Cabinet.

the options feature the following, and yes i'm listing every single one because we don't skip ๐Ÿ’…

  • -tl โ€” enable the option HDBTLARGE. ๐Ÿ‘‘
  • -td โ€” enable the option HDBTDEFLATE.
  • -tb โ€” enable the option HDBTBZIP.
  • -tt โ€” enable the option HDBTTCBS.
  • -tx โ€” enable the option HDBTEXCODEC.
  • -nl โ€” enable the option HDBNOLCK.
  • -nb โ€” enable the option HDBLCKNB.
  • -sx โ€” the input data is evaluated as a hexadecimal data string. ๐Ÿ”ข
  • -dk โ€” use the function tchdbputkeep instead of tchdbput.
  • -dc โ€” use the function tchdbputcat instead of tchdbput.
  • -dai โ€” use the function tchdbaddint instead of tchdbput.
  • -dad โ€” use the function tchdbadddouble instead of tchdbput.
  • -px โ€” the output data is converted into a hexadecimal data string. ๐Ÿ”„
  • -pz โ€” do not append line feed at the end of the output.
  • -m num โ€” specify the maximum number of the output. ๐Ÿงฎ
  • -pv โ€” print values of records also.
  • -fm str โ€” specify the prefix of keys.
  • -tz โ€” enable the option UINT8_MAX. ๐ŸŒˆ
  • -df โ€” perform defragmentation only.
  • -sc โ€” normalize keys as lower cases. ๐Ÿ”ก
and the vibe check on exit status: this command returns 0 on success, and another on failure. periodt. ๐Ÿ’€

๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹

tchtest(1), tchmttest(1), tchdb(3), tokyocabinet(3) โ€” go read your siblings bestie, they're all iconic too ๐ŸŽ€


and that's the whole page!! Man Page, 2012-08-18, TCHMGR(1) โ€” mwah, love u, go slay some hash databases ๐Ÿ’–โœจ๐ŸŒธ๐Ÿซถ