File: gdbm.info, Node: invocation, Next: shell, Up: gdbmtool 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 (*note 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' (*note open a file: (open(2))open.), 'creat' or a similar function. The database will be opened using 'gdbm_fd_open' (*note 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 (*note 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. *Note timing: variables. '-t' '--trace' Enable command tracing. This is equivalent to setting the 'trace' variable. *Note trace: variables. '-q' '--quiet' Don't print the usual welcome banner at startup. This is the same as setting the variable 'quiet' in the startup file. *Note 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 (*note Numsync::). This option sets the 'format' variable to 'numsync'. *Note format variable::.