makedbm(8) CLIX makedbm(8)
NAME
makedbm - Makes an NIS dbm file
SYNOPSIS
/etc/yp/makedbm [-i yp-input-file] [-o yp-output-name] [-d yp-domain-name]
[-m yp-master-name] infile outfile
/etc/yp/makedbm [-u dbm-filename]
FLAGS
The following flags are recognized by makedbm:
-i yp-input-file
Creates a special entry with the key yp-input-file.
-o yp-output-name
Creates a special entry with the key yp-output-name.
-d yp-domain-name
Creates a special entry with the key yp-domain-name.
-m yp-master-name
Creates a special entry with the key yp-master-name. If no master
hostname is specified, yp-master-name is set to the local hostname.
-u dbmfilename
Undoes a dbm file. That is, it displays a dbm file one entry per
line, with a single space separating keys from values.
DESCRIPTION
The makedbm command converts infile to a pair of files in ndbm format,
namely outfile.pag and outfile.dir. Each line of the input file is
converted to a single dbm record. All characters up to the first tab or
space form the key, and the rest of the line is the data. If a line ends
with ``\'', the data for that record is continued to the next line. The
clients of the Network Information Service (NIS) will interpret ``#'';
makedbm does not treat it as a comment character. The infile file can be
-, in which case stdin is read.
The makedbm command is used in generating dbm files for the NIS and it
generates a special entry with the key yp-last-modified, which is the date
of infile (or the current time, if infile is -).
EXAMPLES
It is easy to write shell scripts to convert standard files such as
/etc/passwd to the key value form used by makedbm. For example, the awk
2/94 - Intergraph Corporation 1
makedbm(8) CLIX makedbm(8)
command
BEGIN { FS = ":"; OFS = "\t"; }
{ print $1, $0 }
converts the /etc/passwd file to a form that can be read by makedbm to
make the NIS passwd.byname file. That is, the key is a username and the
value is the remaining line in the /etc/passwd file.
RELATED INFORMATION
Commands: yppasswd(1)
2 Intergraph Corporation - 2/94