1.\" Copyright (c) 1990, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 3. Neither the name of the University nor the names of its contributors 13.\" may be used to endorse or promote products derived from this software 14.\" without specific prior written permission. 15.\" 16.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26.\" SUCH DAMAGE. 27.\" 28.\" from: @(#)dev_mkdb.8 8.1 (Berkeley) 6/6/93 29.\" $Id: dev_mkdb.8,v 1.6 2007/05/31 19:20:23 jmc Exp $ 30.\" 31.Dd $Mdocdate: May 31 2007 $ 32.Dt DEV_MKDB 8 33.Os 34.Sh NAME 35.Nm dev_mkdb 36.Nd create 37.Pa /dev 38database 39.Sh SYNOPSIS 40.Nm dev_mkdb 41.Sh DESCRIPTION 42The 43.Nm 44command creates a 45.Xr db 3 46hash access method database in 47.Dq Pa /var/run/dev.db 48which contains the names of all of the character and block special 49files in the 50.Dq Pa /dev 51directory, using the file type and the 52.Va st_rdev 53field as the key. 54.Pp 55Keys are a structure containing a 56.Tn mode_t 57followed by a 58.Tn dev_t , 59with any padding zeroed out. 60The former is the type of the file 61.Pq st_mode & S_IFMT , 62the latter is the 63.Va st_rdev 64field. 65.Sh FILES 66.Bl -tag -width /var/run/dev.db -compact 67.It Pa /dev 68device directory 69.It Pa /var/run/dev.db 70database file 71.El 72.Sh SEE ALSO 73.Xr ps 1 , 74.Xr stat 2 , 75.Xr db 3 , 76.Xr devname 3 , 77.Xr kvm_nlist 3 , 78.Xr ttyname 3 , 79.Xr kvm_mkdb 8 80.Sh HISTORY 81The 82.Nm 83command appeared in 84.Bx 4.4 . 85