GDBM_LOAD(1)
π GDBM_LOAD(1) π
okay bestie, welcome to the GDBM User Reference β this one's gdbm_load, and it's literally the glow-up artist that rebuilds a whole GDBM database out of a dump file. slay.
β¨ NAME β¨
gdbm_load β re-create a GDBM database from a dump file. that's it, that's the job, and it eats every single time π«Ά
πΈ SYNOPSIS πΈ
gdbm_load [-MUnr] [-b NUM] [-c NUM] [-m MODE] [-u NAME|UID[:NAME|GID]]
[--block-size=NUM] [--cache-size=NUM] [--mmap=NUM] [--mode=MODE]
[--no-meta] [--replace] [--update] [--user=NAME|UID[:NAME|GID]] FILE
[DB_FILE]
gdbm_load [-Vh] [--help] [--usage] [--version]
π¦ DESCRIPTION π¦
so basically: you take a dump file FILE and it builds you a gdbm database file DB_FILE from it. iconic behavior, honestly.
but wait β if you don't pass the FILE argument? then it outputs the created database to the standard error. yes bestie, stderr. not a typo, we're just like that. π
and here's the juicy part: if your input file is in ASCII dump format, then the mode and ownership of the newly created database get restored straight from the info in the dump. the dump remembered everything, it's so thoughtful. π₯Ή
but you can override all that with the command line options β see below, they're right there, go look. β¬οΈ
π OPTIONS π
-b,--block-size=NUMβ sets block size. number go in, block size go out. β¨-c,--cache-size=NUMβ sets cache size. more cache, more vibes.-M,--mmapβ use memory mapping. it's giving efficiency.-m,--mode=MODEβ set the database file mode (as an octal number, so like, speak octal to it).-n,--no-metaβ do NOT attempt to restore database meta-data (that's the mode and the ownership). no thoughts, no metadata, just data. π-r,--replaceβ replace existing keys. β οΈ heads up bestie: this one MUST be used together with the-U(--update) option. they're a package deal, they don't come separately, periodt.-U,--updateβ update an existing database. key/value pairs from the dump file get added to that database, without removing the keys already chillin' there. so if you wanna overwrite keys that show up duplicated in the dump file, you gotta bring--replacealong. and btw β if the database doesn't exist? it will be created. it's flexible like that. πββοΈ-u,--user=NAME|UID[:NAME|GID]β set file ownership. (the format is literallyNAME|UID[:NAME|GID], copy it exactly, don't freestyle it.)-h,--helpβ print a short usage summary. your little cheat sheet. π--usageβ print a list of available options. the full menu, no filter.-V,--versionβ print program version. proof it's real.
π SEE ALSO π
and if you want the full detailed description of gdbm_load and the other gdbm utilities, the GDBM Manual exists in Texinfo format. to access it, just run:
info gdbm
the docs are also online at:
https://www.gnu.org/software/gdbm/manual
β οΈ real talk: should any discrepancies ever occur between this manpage and the GDBM Manual β the latter shall be considered the authoritative source. the manual is the main character here, this page is just the bestie hyping it up. π
π REPORTING BUGS π
found a bug? report it to <bug-gdbm@gnu.org>. they wanna know, fr fr.
π COPYRIGHT π
Copyright Β© 2013-2025 Free Software Foundation, Inc
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. (say it with me β no warranty, bestie. none. zero. π«Ά)
and that's the whole page!! GDBM energy, dated March 6, 2025, from the GDBM_LOAD(1) section of the GDBM User Reference. go rebuild that database, you absolute icon. πβ¨ππ¦πΈπ π₯πβπ
π¦ where this page comes from
- alpine 3.23: gdbm-doc 1.26-r0 Β· GPL-3.0-or-later
- alpine 3.24: gdbm-doc 1.26-r0 Β· GPL-3.0-or-later
- arch rolling: gdbm 1.26-2 Β· GPL-3.0-or-later
- centos-stream 10: gdbm 1:1.26-15.el10 Β· GPL-3.0-or-later
- nixpkgs unstable: gdbm 1.26
- ubuntu questing: gdbmtool 1.26-1
- ubuntu resolute: gdbmtool 1.26-1build1 Β· GPL-3.0-or-later
- ubuntu stonking: gdbmtool 1.26-1build1 Β· GPL-3.0-or-later
- Copyright (C) 2011-2025 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms