Next: , Previous: , Up: Top   [Contents][Index]


26 The gdbm_load utility

The gdbm_load utility restores a GDBM database from a flat file. The utility requires at least one argument: the name of the input flat file. If it is ‘-’, the standard input will be read. The format of the input file is detected automatically.

By default the utility attempts to restore the database under its original name, as stored in the input file. It will fail to do so if the input is in binary format. In that case, the name of the database must be given as the second argument.

In general, if two arguments are given, the second one is treated as the name of the database to create, overriding the file name specified in the flat file.

The utility understands the following command line arguments:

-b num
--block-size=num

Sets block size. See block_size.

-c num
--cache-size=num

Sets cache size. See GDBM_SETCACHESIZE.

-M
--mmap

Use memory mapping.

-m mode
--mode=mode

Sets the file mode. The argument is the desired file mode in octal.

-n
--no-meta

Do not restore file meta-data (ownership and mode) from the flat file.

-r
--replace

Replace existing keys.

-u user[:group]
--user=user[:group]

Set file owner. The user can be either a valid user name or UID. Similarly, the group is either a valid group name or GID. If group is not given, the main group of user is used.

User and group parts can be separated by a dot, instead of the colon.

-h
--help

Print a concise help summary.

-V
--version

Print program version and licensing information and exit.

--usage

Print a terse invocation syntax summary along with a list of available command line options.


Next: , Previous: , Up: Top   [Contents][Index]