path: root/doc/gdbmtool.1
diff options
Diffstat (limited to 'doc/gdbmtool.1')
1 files changed, 245 insertions, 0 deletions
diff --git a/doc/gdbmtool.1 b/doc/gdbmtool.1
new file mode 100644
index 0000000..e6a8f2a
--- /dev/null
+++ b/doc/gdbmtool.1
@@ -0,0 +1,245 @@
+.\" This file is part of GDBM.
+.\" Copyright (C) 2013 Free Software Foundation, Inc.
+.\" GDBM is free software; you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation; either version 3, or (at your option)
+.\" any later version.
+.\" GDBM is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" GNU General Public License for more details.
+.\" You should have received a copy of the GNU General Public License
+.\" along with GDBM. If not, see <http://www.gnu.org/licenses/>. */
+.TH GDBM_DUMP 1 "May 8, 2013" "GDBM" "GDBM User Reference"
+gdbmtool \- examine and modify a GDBM database
+\fBgdbmtool\fR [\fB\-lmnqrs\fR] [\fB\-b\fR \fISIZE\fR] [\fB\-c\fR \fISIZE\fR]\
+ [\fB\-g\fR \fIFILE\fR] [\fB\-\-block\-size\fR=\fISIZE\fR]
+ [\fB\-\-cache\-size\fR=\fISIZE\fR] [\fB\-\-newdb\fR]\
+ [\fB\-\-no\-lock\fR] [\fB\-\-no\-mmap\fR]
+ [\fB\-\-quiet\fR] [\fB\-\-read\-only\fR] [\fB\-\-synchronize\fR]\
+ [\fIDBFILE\fR]
+\fBgdbmtool\fR [\fB\-Vh\fR] ][\fB\-\-help\fR] [\fB\-\-usage\fR] [\fB\-\-version\fR]
+.B gdbmtool
+utility allows you to view and modify an existing GDBM database or to
+create a new one.
+The \fIDBFILE\fR argument supplies the name of the database to open.
+If not supplied, the default name
+.B junk.gdbm
+is used instead.
+If the named database does not exist, it will be created. An existing
+database can be cleared (i.e. all records removed from it) using the
+\fB\-\-newdb\fR option (see below).
+After successful startup,
+.B gdbmtool
+starts a loop, in which it reads
+commands from the user, executes them and prints the results on the
+standard output. If the standard input is attached to a console,
+the program runs in interactive mode.
+The program terminates when the
+.B quit
+command is given, or end-of-file is detected on its standard input.
+.B gdbmtool
+command consists of a command verb, optionally
+followed by one or more arguments, separated by any amount of white
+space. A command verb can be entered either in full or in an
+abbreviated form, as long as that abbreviation does not match any other
+verb. Many command verbs have also one-letter abbreviation which can
+be used instead.
+\fB\-b\fR, \fB\-\-block\-size\fR=\fISIZE\fR
+Set block size.
+\fB\-c\fR, \fB\-\-cache\-size\fR=\fISIZE\fR
+Set cache size.
+\fB\-l\fR, \fB\-\-no\-lock\fR
+Disable file locking.
+\fB\-m\fR, \fB\-\-no\-mmap\fR
+Do not use
+.BR mmap (2).
+\fB\-n\fR, \fB\-\-newdb\fR
+Create the database, truncating it if it already exists.
+\fB\-q\fR, \fB\-\-quiet\fR
+Don't print initial banner.
+\fB\-r\fR, \fB\-\-read\-only\fR
+Open database in read-only mode.
+\fB\-s\fR, \fB\-\-synchronize\fR
+Synchronize to disk after each write.
+\fB\-h\fR, \fB\-\-help\fR
+Print a short usage summary.
+Print a list of available options.
+\fB\-V\fR, \fB\-\-version\fR
+Print program version
+For command verbs that have single-letter abbreviations, these are
+printed after a comma. Either command verb or its abbreviation must
+be used, but not both.
+.BR avail ", " A
+Print the "
+.BR "avail list" .
+\fBbucket\fR, \fBB\fR \fINUM\fR
+Print the bucket number \fINUM\fR.
+.BR cache ", " K
+Print the bucket cache.
+.BR count ", " c
+Print the number of entries in the database.
+.BR current ", " C
+Print the current bucket.
+.BR data-zero ", " Z
+Toggle data nul-termination. Use
+.B status
+to examine the current status.
+\fBdelete\fR, \fBd\fR \fIKEY\fR
+Delete entry with the given \fIKEY\fR.
+.BR dir ", " D
+Print hash directory.
+\fBexport\fR, \fBe\fR \fIFILE\-NAME\fR [\fBtruncate\fR] [\fBbinary\fR|\fBascii\fR]
+Export the database to the flat file \fIFILE\-NAME\fR. This is equivalent to
+.BR gdbm_dump (1).
+This command will not overwrite an existing file, unless the
+.B truncate
+parameter is also given. Another optional parameter determines the type of
+the dump (*note Flat files::). By default, ASCII dump will be created.
+\fBfetch\fR, \fBf\fR \fIKEY\fR
+Fetch and display the record with the given \fIKEY\fR.
+.BR first ", " 1
+Fetch and display the first record in the database. Subsequent
+records can be fetched using the
+.B next
+command (see below).
+\fBhash\fR, \fBH\fR \fIKEY\fR
+Compute and display hash value for the given \fIKEY\fR.
+.BR header ", " F
+Print file header.
+.BR help ", " ?
+Print a concise command summary, showing each command letter and
+verb with its parameters and a short description of what it does.
+Optional arguments are enclosed in square brackets.
+\fBimport\fR, \fBi\fR \fIFILE\-NAME\fR [\fBreplace\fR] [\fBnometa\fR]
+Import data from a flat dump file \fIFILE\-NAME\fR.
+If the
+.B replace
+argument is given, any records with the same keys as the already
+existing ones will replace them. The
+.B nometa
+argument turns off restoring meta-information from the dump file.
+.BR key-zero ", " z
+Toggle key nul-termination. Use
+.B status
+to inspect the current state.
+\fBlist\fR, \fBl\fR
+List the contents of the database.
+\fBnext\fR, \fBn\fR [\fIKEY\fR]
+Sequential access: fetch and display the next record. If the \fIKEY\fR is
+given, the record following the one with this key will be fetched.
+\fBprompt\fR \fITEXT\fR
+Changes the command prompt to the string \fITEXT\fR. The string can
+.BR "escape sequences" ,
+the special entities consisting of the
+.B %
+character followed by another character. These sequences are
+replaced in the generated prompt as follows:
+.ta 8n 20n
+ Sequence Expansion
+ \fB%f\fR name of the db file
+ \fB%%\fR \fB%\fR
+.BR quit ", " q
+Close the database and quit the utility.
+\fBread\fR, \fB<\fR \fIFILE\fR [\fBreplace\fR]
+Read entries from \fIFILE\fR and store them in the database. If the
+.B replace
+parameter is given, any existing records with matching keys will be replaced.
+.BR reorganize ", " r
+Reorganize the database.
+.BR status ", " S
+Print current program status. The following example shows the
+information displayed:
+.if +2
+Database file: junk.gdbm
+Zero terminated keys: yes
+Zero terminated data: yes
+\fBstore\fR, \fBs\fR \fIKEY\fR \fIDATA\fR
+Store the \fIDATA\fR with the given \fIKEY\fR in the database. If the
+\fIKEY\fR already exists, its data will be replaced.
+.BR version ", " v
+Print the version of
+.BR gdbm .
+.BR gdbm_dump (1),
+.BR gdbm_load (1),
+.BR gdbm (3).
+Report bugs to <bug\-gdbm@gnu.org>.
+Copyright \(co 2013 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.
+.\" Local variables:
+.\" eval: (add-hook 'write-file-hooks 'time-stamp)
+.\" time-stamp-start: ".TH GDBM[A-Z_-]* 1 \""
+.\" time-stamp-format: "%:B %:d, %:y"
+.\" time-stamp-end: "\""
+.\" time-stamp-line-limit: 20
+.\" end:

Return to:

Send suggestions and report system problems to the System administrator.