Next: , Up: gdbmtool   [Contents][Index]


24.1 gdbmtool invocation

When started without additional arguments, gdbmtool operates on the default database junk.gdbm. Otherwise, the first argument supplies the name of the database to operate upon. If neither any additional arguments nor the -f (--file) option are given, gdbmtool opens starts interactive shell and receives commands directly from the human operator.

If more than one argument is given, all arguments past the database name are parsed as gdbmtool commands (see shell, for a description of available commands) and executed in turn. All commands, except the last one, should be terminated with semicolons. Semicolon after the last command is optional. Note, that semicolons should be escaped in order to prevent them from being interpreted by the shell.

Finally, if the -f (--file) option is supplied, its argument specifies the name of the disk file with gdbmtool script. The program will open that file and read commands from it.

The following table summarizes all gdbmtool command line options:

-b size
--block-size=size

Set block size.

-c size
--cache-size=size

Set cache size.

-d fd
--db-descriptor=fd

Use the database referred to by the file descriptor fd. This must be a valid open file descriptor, obtained by a call to open (see open a file in open(2) man page), creat or a similar function. The database will be opened using gdbm_fd_open (see gdbm_fd_open).

This option is intended for use by automatic test suites.

-f file
--file file

Read commands from file, instead of the standard input.

-h
--help

Print a concise help summary.

-N
--norc

Don’t read startup files (see startup files).

-n
--newdb

Create the database.

-l
--no-lock

Disable file locking.

-m
--no-mmap

Disable memory mapping.

-T
--timing

Print time spent in each command. This is equivalent to setting the timing variable. See timing.

-t
--trace

Enable command tracing. This is equivalent to setting the trace variable. See trace.

-q
--quiet

Don’t print the usual welcome banner at startup. This is the same as setting the variable quiet in the startup file. See quiet.

-r
--read-only

Open the database in read-only mode.

-s
--synchronize

Synchronize to the disk after each write.

-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.

-x
--extended
--numsync

Create new database in extended (numsync) format (see Numsync). This option sets the format variable to ‘numsync’. See format variable.


Next: , Up: gdbmtool   [Contents][Index]