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
@@ -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
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.\" 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]\
+\fBgdbmtool\fR [\fB\-Vh\fR] ][\fB\-\-help\fR] [\fB\-\-usage\fR] [\fB\-\-version\fR]
+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
+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,
+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
+command is given, or end-of-file is detected on its standard input.
+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.
+Set block size.
+Set cache size.
+Disable file locking.
+Do not use
+.BR mmap (2).
+Create the database, truncating it if it already exists.
+Don't print initial banner.
+Open database in read-only mode.
+Synchronize to disk after each write.
+Print a short usage summary.
+Print a list of available options.
+Print program version
+.SH SHELL COMMANDS
+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
+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
+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
+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.
+argument is given, any records with the same keys as the already
+existing ones will replace them. The
+argument turns off restoring meta-information from the dump file.
+.BR key-zero ", " z
+Toggle key nul-termination. Use
+to inspect the current state.
+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.
+Changes the command prompt to the string \fITEXT\fR. The string can
+.BR "escape sequences" ,
+the special entities consisting of the
+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
+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
+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 .
+.SH "SEE ALSO"
+.BR gdbm_dump (1),
+.BR gdbm_load (1),
+.BR gdbm (3).
+.SH "REPORTING BUGS"
+Report bugs to <bug\-email@example.com>.
+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