aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-05-24 17:46:07 +0300
committerSergey Poznyakoff <gray@gnu.org>2018-05-24 18:16:01 +0300
commit8d2f483b28f8418703982658b3e7dda7a96ad335 (patch)
tree731e5d6103090f835dd7602395f44fd2154c7d6b /doc
parentb001c227fdf02e3ed1e87161cbc1dec4a1184203 (diff)
downloadgdbm-8d2f483b28f8418703982658b3e7dda7a96ad335.tar.gz
gdbm-8d2f483b28f8418703982658b3e7dda7a96ad335.tar.bz2
Various fixes
* src/input-std.c: Bugfix * doc/gdbm.texi: Document changes. * README: Update. * configure.ac: New option --enable-gdbmtool-debug. * src/Makefile.am: Conditionally augment AM_YFLAGS and AM_LFLAGS with options that enable debugging. * src/gdbmtool.c: Conditionally enable --lex-trace and --gram-trace options. * src/gram.y: Likewise. * src/lex.l: Likewise. * tests/Makefile.am: Remove architecure-dependent tests. * tests/testsuite.at: Likewise.
Diffstat (limited to 'doc')
-rw-r--r--doc/gdbm.texi62
1 files changed, 58 insertions, 4 deletions
diff --git a/doc/gdbm.texi b/doc/gdbm.texi
index 0876f8d..8920839 100644
--- a/doc/gdbm.texi
+++ b/doc/gdbm.texi
@@ -1953,12 +1953,30 @@ the database already exists, it will be deleted, so use it sparingly.
1953@end menu 1953@end menu
1954 1954
1955@node invocation 1955@node invocation
1956@section gdbmtool invocation 1956@section gdbmtool invocation
1957@cindex command line options, @command{gdbmtool} 1957@cindex command line options, @command{gdbmtool}
1958 1958
1959When started without additional arguments, @command{gdbmtool} operates
1960on the default database @file{junk.gdbm}. Otherwise, the first
1961argument supplies the name of the database to operate upon. If neither
1962any additional arguments nor the @option{-f} (@option{--file}) option
1963are given, @command{gdbmtool} opens starts interactive shell and
1964receives commands directly from the human operator.
1965
1966If more than one arguments are given, all arguments past the database
1967name are parsed as @command{gdbmtool} commands (@pxref{shell}, for a
1968description of available commands) and executed in turn. All commands,
1969except the last one, should be terminated with semicolons. Semicolon
1970after the last command is optional. Note, that semicolons should be
1971escaped in order to prevent them from being interpreted by the shell.
1972
1973Finally, if the @option{-f} (@option{--file}) option is supplied, its
1974argument specifies the name of the disk file with @command{gdbmtool}
1975script. The program will open that file and read commands from it.
1976
1959The following table summarizes all @command{gdbmtool} command line 1977The following table summarizes all @command{gdbmtool} command line
1960options: 1978options:
1961 1979
1962@table @option 1980@table @option
1963@item -b @var{size} 1981@item -b @var{size}
1964@itemx --block-size=@var{size} 1982@itemx --block-size=@var{size}
@@ -2019,16 +2037,17 @@ gdbmtool> _
2019 2037
2020The utility finishes when it reads the @samp{quit} command (see below) or 2038The utility finishes when it reads the @samp{quit} command (see below) or
2021detects end-of-file on its standard input, whichever occurs first. 2039detects end-of-file on its standard input, whichever occurs first.
2022 2040
2023A @command{gdbmtool} command consists of a @dfn{command verb}, 2041A @command{gdbmtool} command consists of a @dfn{command verb},
2024optionally followed by @dfn{arguments}, separated by any 2042optionally followed by @dfn{arguments}, separated by any
2025amount of white space. A command verb can be entered either in full 2043amount of white space and terminated with a newline or semicolon.
2026or in an abbreviated form, as long as that abbreviation does not match 2044A command verb can be entered either in full or in an abbreviated
2027any other verb. For example, @samp{co} can be used instead of 2045form, as long as that abbreviation does not match any other verb. For
2028@samp{count} and @samp{ca} instead of @samp{cache}. 2046example, @samp{co} can be used instead of @samp{count} and @samp{ca}
2047instead of @samp{cache}.
2029 2048
2030Any sequence of non-whitespace characters appearing after the command 2049Any sequence of non-whitespace characters appearing after the command
2031verb forms an argument. If the argument contains whitespace or 2050verb forms an argument. If the argument contains whitespace or
2032unprintable characters it must be enclosed in double quotes. Within 2051unprintable characters it must be enclosed in double quotes. Within
2033double quotes the usual @dfn{escape sequences} are understood, as 2052double quotes the usual @dfn{escape sequences} are understood, as
2034shown in the table below: 2053shown in the table below:
@@ -2302,12 +2321,20 @@ Print the number of entries in the database.
2302@end deffn 2321@end deffn
2303 2322
2304@deffn {command verb} current 2323@deffn {command verb} current
2305Print the current bucket. 2324Print the current bucket.
2306@end deffn 2325@end deffn
2307 2326
2327@deffn {command verb} debug [[+-]@var{token}...]
2328If @command{GDBM} is configured with additional debugging, this
2329statement queries or sets @command{GDBM} internal debugging level.
2330This is intended for debugging and testing purposes and requires
2331good knowledge of @command{GDBM} internals. The use of this command is
2332not recommended.
2333@end deffn
2334
2308@deffn {command verb} delete @var{key} 2335@deffn {command verb} delete @var{key}
2309Delete record with the given @var{key} 2336Delete record with the given @var{key}
2310@end deffn 2337@end deffn
2311 2338
2312@deffn {command verb} dir 2339@deffn {command verb} dir
2313Print hash directory. 2340Print hash directory.
@@ -2420,12 +2447,39 @@ Specifies the permissions to use in case a new file is created.
2420@end deffn 2447@end deffn
2421 2448
2422@deffn {command verb} quit 2449@deffn {command verb} quit
2423Close the database and quit the utility. 2450Close the database and quit the utility.
2424@end deffn 2451@end deffn
2425 2452
2453@deffn {command verb} recover [@var{options}]
2454Run database recovery. The following @var{options} are understood:
2455
2456@table @option
2457@item backup
2458Create a backup copy of the original database.
2459
2460@item max-failed-buckets=@var{n}
2461Abort recovery process if @var{n} buckets could not be recovered.
2462
2463@item max-failed-keys=@var{n}
2464Abort recovery process if @var{n} keys could not be recovered.
2465
2466@item max-failures=@var{n}
2467Abort recovery process after @var{n} failures. A @dfn{failure} in this
2468context is either a key or a bucket that failed to be recovered.
2469
2470@item summary
2471Print the recovery statistics at the end of the run. The statistics
2472includes number of successfully recovered, failed and duplicate keys
2473and the number of recovered and failed buckets.
2474
2475@item verbose
2476Verbosely list each error encountered.
2477@end table
2478@end deffn
2479
2426@deffn {command verb} reorganize 2480@deffn {command verb} reorganize
2427Reorganize the database (@pxref{Reorganization}). 2481Reorganize the database (@pxref{Reorganization}).
2428@end deffn 2482@end deffn
2429 2483
2430@deffn {command verb} source @var{filename} 2484@deffn {command verb} source @var{filename}
2431Read @command{gdbmtool} commands from the file @var{filename}. 2485Read @command{gdbmtool} commands from the file @var{filename}.

Return to:

Send suggestions and report system problems to the System administrator.