GDBM_LOAD(1)

πŸ“¦
version 1.26 Β· 3 versions
, in alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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 --replace along. 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 literally NAME|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 Β© 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. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ”₯πŸ‘‘β­πŸ’œ