Next: Exit codes, Previous: gdbm_dump, Up: Top [Contents][Index]
gdbm_load
utilityThe 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. All existing keys will be removed from this database prior to loading from the dump. Use the --update (-U) option if it is not what you wish.
When given the --update (-U) option,
gdbm_load
will update the existing database with the data
from the dump. It will bail out if the dump contains a key that is
already present in the database. To silently overwrite existing keys,
use the --replace (-r) option.
The utility understands the following command line options:
Sets block size. See block_size.
Sets cache size. See GDBM_SETCACHESIZE.
Use memory mapping.
Sets the file mode. The argument is the desired file mode in octal.
Do not restore file meta-data (ownership and mode) from the flat file.
Replace existing keys. This option can be used only together with --update (-U).
Update an existing database. The key/value pairs from the dump file will be added to that database, without removing the existing keys. To overwrite keys that are duplicated in the dump file, use --update --replace.
If the database does not exist, it will be created.
Set file owner. The owner 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 owner is implied, if owner is followed by a ‘:’, otherwise the login group of the current user is implied.
User and group parts can be separated by a dot, instead of the colon, but such usage is discouraged.
Print a concise help summary.
Print program version and licensing information and exit.
Print a terse invocation syntax summary along with a list of available command line options.
Next: Exit codes, Previous: gdbm_dump, Up: Top [Contents][Index]