KCDIRMGR(1)

πŸ’– KCDIRMGR(1) β€” Kyoto Cabinet's directory hash database wrangler πŸ’–

okay bestie, welcome to kcdirmgr from the Kyoto Cabinet manual (section 1, the user commands, obviously πŸ’…). this is your command-line bestie for managing the directory hash database. let's get into it 🫢


🌸 NAME 🌸

kcdirmgr β€” literally the command line interface to manage the directory hash database. that's it, that's the vibe. no cap.


✨ DESCRIPTION ✨

so here's the tea β˜•: the command kcdirmgr is a utility for test and debugging of the directory hash database and its applications. it's giving developer-tools energy, fr fr.

before we go any further, let's meet the squad of arguments you'll be passing around:

  • path β€” specifies the path of a database file. this is the main character of every single subcommand.
  • key β€” specifies the key of a record.
  • value β€” specifies the value of a record.
  • file β€” specifies the input/output file.

got it? iconic. now the subcommands πŸ‘‘


πŸŽ€ the subcommands (aka the whole menu) πŸŽ€

  • kcdirmgr create [-otr] [-onl|-otl|-onr] [-tc] path β€” creates a database file. brand new db, fresh out the box ✨
  • kcdirmgr inform [-onl|-otl|-onr] [-st] path β€” prints status information. the gossip report on your database πŸ’…
  • kcdirmgr set [-onl|-otl|-onr] [-add|-app|-rep|-inci|-incd] [-sx] path key value β€” stores a record. put it in, bestie.
  • kcdirmgr remove [-onl|-otl|-onr] [-sx] path key β€” removes a record. bye girl πŸ‘‹
  • kcdirmgr get [-onl|-otl|-onr] [-rm] [-sx] [-px] [-pz] path key β€” prints the value of a record. fetch, but make it unix.
  • kcdirmgr list [-onl|-otl|-onr] [-max num] [-rm] [-sx] [-pv] [-px] path [key] β€” prints keys of all records, separated by line feeds.
  • kcdirmgr clear [-onl|-otl|-onr] path β€” removes all records of a database. scorched earth, but consensual πŸ’€
  • kcdirmgr import [-onl|-otl|-onr] [-sx] path [file] β€” imports records from a TSV file.
  • kcdirmgr copy [-onl|-otl|-onr] path file β€” copies the whole database. clone her πŸ’–
  • kcdirmgr dump [-onl|-otl|-onr] path [file] β€” dumps records into a snapshot file.
  • kcdirmgr load [-otr] [-onl|-otl|-onr] path [file] β€” loads records from a snapshot file.
  • kcdirmgr defrag [-onl|-otl|-onr] path β€” performs defragmentation. glow-up for your storage πŸ§–
  • kcdirmgr setbulk [-onl|-otl|-onr] path key value ... β€” store records at once. speedrun edition πŸ”₯
  • kcdirmgr removebulk [-onl|-otl|-onr] [-sx] path key ... β€” remove records at once.
  • kcdirmgr getbulk [-onl|-otl|-onr] [-sx] [-px] path key ... β€” retrieve records at once.
  • kcdirmgr check [-onl|-otl|-onr] path β€” checks consistency. vibe check, but for your data 🌈

πŸ’… OPTIONS πŸ’…

here's where it gets juicy. options feature the following, and you're gonna want to screenshot this:

  • -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.
  • -tc β€” tunes the database with the compression option.
  • -st β€” prints miscellaneous information.
  • -add β€” performs adding operation.
  • -app β€” performs appending operation.
  • -rep β€” performs replacing operation.
  • -inci β€” performs integer increment operation.
  • -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.
  • -max num β€” specifies the maximum number of shown records.
  • -pv β€” prints values of records also.
⚠️ heads up bestie: -onl, -otl and -onr are mutually exclusive-ish in the synopses β€” you pick one from that little group, not all three at once. read the synopsis, trust the synopsis πŸ™ˆ

🌟 exit status 🌟

This command returns 0 on success, another on failure. so if you get a 0, she ate. anything else? not her day 😭


πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole page, bestie! this one's from the Kyoto Cabinet manual, dated 2012-05-24, and the footer said Man Page with KCDIRMGR(1) as the title β€” so if you ever need to cite her, that's the receipt. now go forth and manage that directory hash database like the main character you are. periodt. πŸ’…βœ¨πŸ‘‘