makedbm(1M) makedbm(1M)
NAME
makedbm - generate files in Network Information Service format
SYNOPSIS
makedbm [-l] [-i ypin] [-o ypout] [-d domain]
[-m master] infile outfile Format 1
makedbm -u dbmfile Format 2
DESCRIPTION
You only need this command if you do not wish to use the standard NIS
files. Use the command make [see ypmake(1M)] to generate the standard
Network Information Service files. make works with a makefile which
also uses the command makedbm. With the makedbm command you can
- generate a file in dbm format from an existing ASCII file. These
converted files can be used by the Network Information Service (see
Format 1 in the syntax description).
- obtain information about the contents of existing NIS files (see
Format 2 in the syntax description).
The contents of the standard NIS files can also be output with the
commands ypcat(1) and ypmatch(1).
Format 1
-l Converts the NIS file keys to lowercase letters.
-i ypin
Indicates the value to be entered for the key YPINPUTFILE. The
name of the input file should be specified for ypin.
-o ypout
Indicates the value to be entered for the key YPOUTPUTFILE. The
name of the output file should be specified for ypout.
-d domain
Indicates the value to be entered for the key YPDOMAINNAME. The
name of the domain for which the output file is generated should
be specified for domain.
-m master
Indicates the value to be entered for the key YPMASTERNAME. The
name of the master of this NIS file should be specified for mas-
ter.
If master is not specified, the name of the local host is used.
Page 1 Reliant UNIX 5.44 Printed 11/98
makedbm(1M) makedbm(1M)
infile
Must be specified. infile is the name of the ASCII file to be
passed on to the command.
A minus sign (-) may also be specified. If this is the case, the
system will read from standard input.
outfile
Must be specified. outfile is the name to be given to the files
generated in dbm format. outfile is automatically given the file
name extensions .pag and .dir.
Before this command can be used, the ASCII file that is to be con-
verted to dbm format must have the following structure:
key data
Conversion to this format is done for the standard NIS files in
/var/yp/Makefile [see ypmake(1M)].
The makedbm command generates two output files in dbm format from the
input file. These files have the file name extensions .pag and .dir.
Each line in the input file is converted to a single dbm record. All
the characters up to the first blank or tab character are interpreted
as the key, while the rest of the line represents the data. If a line
ends with a backslash, this means that the data for this record is
continued on the next line.
The makedbm command does not recognize the comment character (#).
The makedbm command generates a special entry with the following key
in the output files in dbm format:
YPLASTMODIFIED
This special entry gives the date and time at which the input file was
created.
Format 2
-u dbmfile
Must be specified if the contents of a dbm file are to be output.
dbmfile is the name of this file.
Each entry in this file is output on a separate line. The key and
the data are separated by a blank.
Page 2 Reliant UNIX 5.44 Printed 11/98
makedbm(1M) makedbm(1M)
EXAMPLES
The ASCII file xxx on the master contains the following key and
values:
mountainview mountainview grafing grafing athens athens
The network administrator wishes to make the xxx file accessible to
the Network Information Service.
makedbm xxx yyy
ls yyy.*
The system responds by displaying the following:
yyy.pag yyy.dir
The network administrator now has two files, yyy.pag and yyy.dir,
which can be used by the Network Information Service.
FILES
/var/yp/Makefile
SEE ALSO
ypcat(1), ypmatch(1), ypmake(1M), dbm(3C).
Page 3 Reliant UNIX 5.44 Printed 11/98