Manual browser: services_mkdb(8)

SERVICES_MKDB(8) System Manager's Manual SERVICES_MKDB(8)


services_mkdbgenerate the services databases


services_mkdb [-qv] [-o database] [-V style] [file]

services_mkdb -u [file]


services_mkdb creates a db(3) database for the specified file. If no file is specified, then /etc/services is used. The database is installed into /var/db/services.cdb for CDB format and into /var/db/services.db for DB format (see -V). The file must be in the correct format (see services(5)).

The options are as follows:

-o database
Put the output databases in the named file.
Don't warn about duplicate services. This is the default behavior.
Print the services file to stdout, omitting duplicate entries and comments.
Create a specific version of the database style. style can be cdb to request the CDB format (default) or db to request the DB format. The DB format is useful for compatibility with old statically linked binaries.
Warn about duplicate services.

The databases are used by the C library services routines (see getservent(3)).

services_mkdb exits zero on success, non-zero on failure.


The current services database.
A temporary file.
The current services file.


Because services_mkdb guarantees not to install a partial destination file it must build a temporary file in the same file system and if successful use rename(2) to install over the destination file.

If services_mkdb fails it will leave the previous version of the destination file intact.

May 5, 2010 NetBSD 7.0