KCTREEMGR(1)

πŸ’– KCTREEMGR β€” the Kyoto Cabinet file tree database manager, bestie edition πŸ’–

okay so real quick, this is kctreemgr from the Kyoto Cabinet manual, section 1 (general commands, we love a general command πŸ‘‘). She's a command line interface to manage the file tree database, and she is so underrated.


🌸 NAME 🌸

kctreemgr β€” the command line interface that lets you manage the file tree database. no cap. πŸ¦‹


✨ DESCRIPTION ✨

so like. kctreemgr is a utility for test and debugging of the file tree database and its applications. she's the girl you call when you need to poke at things. πŸ’…

before we go anywhere, let's define our little vocabulary, bestie:

  • path β€” specifies the path of a database file.
  • key β€” specifies the key of a record.
  • value β€” specifies the value of a record.
  • file β€” specifies the input/output file.

got it? got it. 🫢 now here's the whole menu of subcommands, verbatim, no edits, because we respect her:

kctreemgr create [-otr] [-onl|-otl|-onr] [-apow num] [-fpow num]
[-ts] [-tl] [-tc] [-bnum num] [-psiz num] [-rcd|-rcld|-rcdd] path
       Creates a database file.
kctreemgr inform [-onl|-otl|-onr] [-st] path
       Prints status information.
kctreemgr set [-onl|-otl|-onr] [-add|-app|-rep|-inci|-incd] [-sx]
path key value
       Stores a record.
kctreemgr remove [-onl|-otl|-onr] [-sx] path key
       Removes a record.
kctreemgr get [-onl|-otl|-onr] [-rm] [-sx] [-px] [-pz] path key
       Prints the value of a record.
kctreemgr list [-onl|-otl|-onr] [-des] [-max num] [-rm] [-sx]
[-pv] [-px] path [key]
       Prints keys of all records, separated by line feeds.
kctreemgr clear [-onl|-otl|-onr] path
       Removes all records of a database.
kctreemgr import [-onl|-otl|-onr] [-sx] path [file]
       Imports records from a TSV file.
kctreemgr copy [-onl|-otl|-onr] path file
       Copies the whole database.
kctreemgr dump [-onl|-otl|-onr] path [file]
       Dumps records into a snapshot file.
kctreemgr load [-otr] [-onl|-otl|-onr] path [file]
       Loads records from a snapshot file.
kctreemgr defrag [-onl|-otl|-onr] path
       Performs defragmentation.
kctreemgr setbulk [-onl|-otl|-onr] path key value ...
       Store records at once.
kctreemgr removebulk [-onl|-otl|-onr] [-sx] path key ...
       Remove records at once.
kctreemgr getbulk [-onl|-otl|-onr] [-sx] [-px] path key ...
       Retrieve records at once.
kctreemgr check [-onl|-otl|-onr] path
       Checks consistency.

okay let's translate the tea β˜• for each one, because that wall of text is giving syllabus energy:

  • create β€” creates a database file. birth. πŸŽ€
  • inform β€” prints status information. she's telling you how she's doing, emotionally and also technically.
  • set β€” stores a record. put the thing in the thing.
  • remove β€” removes a record. bye girl πŸ’€
  • get β€” prints the value of a record. the payoff, the reveal, the main character moment.
  • list β€” prints keys of all records, separated by line feeds. a whole scroll of keys, it's giving receipts.
  • clear β€” removes all records of a database. scorched earth, but make it cute 🌈
  • import β€” imports records from a TSV file.
  • copy β€” copies the whole database.
  • dump β€” dumps records into a snapshot file.
  • load β€” loads records from a snapshot file.
  • defrag β€” performs defragmentation. self care for your database ✨
  • setbulk β€” store records at once. efficiency icon.
  • removebulk β€” remove records at once. mass exit.
  • getbulk β€” retrieve records at once.
  • check β€” checks consistency. the vibe check, literally.

πŸ’… OPTIONS πŸ’…

these are the flags, and yes they work across the subcommands like a shared group chat. here's every single one, no skips, no skimming:

  • -otr β€” opens the database with the truncation option.
  • -onl β€” opens the database with the no locking option.
  • -otl β€” opens the database with the try locking option.
  • -onr β€” opens the database with the no auto repair option.
  • -apow num β€” specifies the power of the alignment of record size.
  • -fpow num β€” specifies the power of the capacity of the free block pool.
  • -ts β€” tunes the database with the small option.
  • -tl β€” tunes the database with the linear option.
  • -tc β€” tunes the database with the compression option.
  • -bnum num β€” specifies the number of buckets of the hash table.
  • -psiz num β€” specifies the size of each page.
  • -rcd β€” use the decimal comparator instead of the lexical one.
  • -rcld β€” use the lexical descending comparator instead of the ascending one.
  • -rcdd β€” use the decimal descending comparator instead of the lexical one.
  • -st β€” prints miscellaneous information. the extras, the lore πŸ“
  • -add β€” performs adding operation.
  • -app β€” performs appending operation.
  • -rep β€” performs replacing operation.
  • -inci β€” performs integer increment operation. math but make it cunty πŸ”₯
  • -incd β€” performs real number increment operation.
  • -sx β€” the input data is evaluated as a hexadecimal data string.
  • -rm β€” removes the record.
  • -px β€” the output data is converted into a hexadecimal data string.
  • -pz β€” does not append line feed at the end of the output.
  • -des β€” visits records in descending order. backwards, but on purpose.
  • -max num β€” specifies the maximum number of shown records.
  • -pv β€” prints values of records also.

🫢 EXIT STATUS 🫢

this command returns 0 on success, another on failure. that's it. that's the whole energy.

πŸ‘‘ SEE ALSO πŸ‘‘

kctreetest(1)


man page Β· 2012-05-24 Β· Kyoto Cabinet Β· kctreemgr(1)

so yeah, that's the whole page bestie πŸ’– written by the Kyoto Cabinet girlies, dated 2012-05-24, filed under KCTREEMGR(1) in section 1. she ate and left no crumbs. periodt. βœ¨πŸŽ€πŸ¦‹