[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
20.2.2 Gdbmtool Commands
- command verb: export file-name [truncate] [binary|ascii]
Export the database to the flat file file-name. See section Export and Import, for a description of the flat file format and its purposes. This command will not overwrite an existing file, unless the ‘truncate’ parameter is also given. Another optional argument determines the type of the dump (see section Export and Import). By default, ASCII dump is created.
The global variable
filemode
specifies the permissions to use for the created output file.
- command verb: first
Fetch and display the first record in the database. Subsequent records can be fetched using the
next
command (see below). See section Sequential access to records., for more information on sequential access.
- command verb: help
- command verb: ?
Print a concise command summary, showing each command verb with its parameters and a short description of what it does. Optional arguments are enclosed in square brackets.
- command verb: import file-name [replace] [nometa]
Import data from a flat dump file file-name (see section Export and Import). If the word ‘replace’ is given as an argument, any records with the same keys as the already existing ones will replace them. The word ‘nometa’ turns off restoring meta-information from the dump file.
- command verb: next [key]
Sequential access: fetch and display the next record. If the key is given, the record following the one with this key will be fetched.
See also
first
, above.See section Sequential access to records., for more information on sequential access.
- command verb: open filename
Open the database file filename. If successful, any previously open database is closed. Otherwise, if the operation fails, the currently opened database remains unchanged.
This command takes additional information from the following variables:
- ‘open’
The database access mode. See The open variable, for a list of its values.
- ‘lock’
Whether or not to lock the database. Default is ‘on’.
- ‘mmap’
Use the memory mapping. Default is ‘on’.
- ‘sync’
Synchronize after each write. Default is ‘off’.
- ‘filemode’
Specifies the permissions to use in case a new file is created.
See open parameters, for a detailed description of these variables.
- command verb: reorganize
Reorganize the database (see section Database reorganization.).
- command verb: status
Print current program status. The following example shows the information displayed:
Database file: junk.gdbm Database is open define key string define content string
The two ‘define’ strings show the defined formats for key and content data. See section Data Definitions, for a detailed discussion of their meaning.
- command verb: store key data
Store the data with key in the database. If key already exists, its data will be replaced.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on January 24, 2014 using texi2html 5.0.