oreilly.comSafari Books Online.Conferences.


Linux in a Nutshell

This directory of Linux commands is from Linux in a Nutshell, 5th Edition.

Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.

Buy it now, or read it online on Safari Bookshelf.


makedbm [options] infile outfilemakedbm [option]

NFS/NIS command. Create or dump an NIS dbm file. makedbm will take a text infile and convert it to a gdbm database file named outfile. This file is suitable for use with ypserv. Each line of the input file is converted to a single 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 onto the next line. The # character is given no special treatment. infile can be -, in which case the standard input is read.

makedbm generates two special keys: the YP_M*ER_NAME key, which is the value of the current host (unless another name is specified with -m), and the YP_L*_MODIFIED key, which is the date of infile (or the current time if infile is -).



Add support for mail aliases.


Insert YP_INTERDOMAIN key into map. This indicates that ypserv should fall back to DNS lookups when a host's address is not found in NIS.


Send a YPPROC_CLEAR signal to ypserv, causing it to clear all cached entries.

-i file_name

Create a YP_INPUT_NAME key with the value file_name.


Convert keys of the given map to lowercase.

-m master_name

Specify the value of the YP_M*ER_NAME key. The default value is the current hostname.


Don't enforce NIS size limits for keys or data.

-o file_name

Create a YP_OUTPUT_NAME key with the value file_name.


Treat lines beginning with # as comments. Do not include them in the datafile.


Add the key YP_SECURE, indicating that ypserv should accept connections to the database only from secure NIS networks.

-u filename

Undo a gdbm file: print out a dbm file, one entry per line, with a single space separating keys from values.


It's 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 program:

BEGIN { FS =":";OFS = "\t";} { print $1, $0}

takes the /etc/passwd file and converts it to a form that can be read by makedbm to make the NIS file passwd.byname. That is, the key is a username and the value is the remaining line in the /etc/passwd file.

Linux Resources
  • Linux Online
  • The Linux FAQ
  • Linux Kernel Archives
  • Kernel Traffic

  • Sponsored by: