enter block special as well
[unix-history] / usr / src / usr.sbin / dev_mkdb / dev_mkdb.8
.\" Copyright (c) 1990 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" %sccs.include.redist.man%
.\"
.\" @(#)dev_mkdb.8 5.2 (Berkeley) %G%
.\"
.TH dev_mkdb 8 ""
.UC 7
.SH NAME
dev_mkdb \- create /dev database
.SH SYNOPSIS
.B dev_mkdb
.SH DESCRIPTION
.I Dev_mkdb
creates a
.IR db (3)
database in ``/var/run/dev.db'' which lists the name and
.I st_rdev
field of all of the character and block special files in the ``/dev'' directory.
Character special files are entered using the
.I st_rdev
field as the key. Block special files are entered using the
.I st_rdev
field followed by a single NULL byte as the key.
The file name is stored as the data.
.PP
This database is used by the devname() function in
.IR ps (1)
and is shared among several other programs.
.SH FILES
/dev Device directory
.br
/var/run/dev.db Database file
.SH SEE ALSO
ps(1), db(3), kvm_nlist(3), ttyname(3), kvm_mkdb(8)