Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dev_mkdb(8) [opendarwin man page]

DEV_MKDB(8)						    BSD System Manager's Manual 					       DEV_MKDB(8)

NAME
dev_mkdb -- create /dev database SYNOPSIS
dev_mkdb DESCRIPTION
The dev_mkdb command creates a db(3) hash access method database in ``/var/run/dev.db'' which contains the names of all of the character and block special files in the ``/dev'' directory, using the file type and the st_rdev field as the key. Keys are a structure containing a mode_t followed by a dev_t, with any padding zero'd out. The former is the type of the file (st_mode & S_IFMT), the latter is the st_rdev field. FILES
/dev Device directory. /var/run/dev.db Database file. SEE ALSO
ps(1), stat(2), db(3), devname(3), kvm_nlist(3), ttyname(3), kvm_mkdb(8) HISTORY
The dev_mkdb command appeared in 4.4BSD. BSD
June 6, 1993 BSD

Check Out this Related Man Page

DEVNAME(3)						   BSD Library Functions Manual 						DEVNAME(3)

NAME
devname -- get device name LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/stat.h> #include <stdlib.h> char * devname(dev_t dev, mode_t type); char * devname_r(dev_t dev, mode_t type, char *buf, int len); char * fdevname(int fd); char * fdevname_r(int fd, char *buf, int len); DESCRIPTION
The devname() function returns a pointer to the name of the block or character device in /dev with a device number of dev, and a file type matching the one encoded in type which must be one of S_IFBLK or S_IFCHR. To find the right name, devname() asks the kernel via the kern.devname sysctl. If it is unable to come up with a suitable name, it will format the information encapsulated in dev and type in a human-readable format. The fdevname() and fdevname_r() function obtains the device name directly from a file descriptor pointing to a character device. If it is unable to come up with a suitable name, these functions will return a NULL pointer. devname() and fdevname() return the name stored in a static buffer which will be overwritten on subsequent calls. devname_r() and fdevname_r() take a buffer and length as argument to avoid this problem. EXAMPLES
int fd; struct stat buf; char *name; fd = open("/dev/tun"); fstat(fd, &buf); printf("devname is /dev/%s ", devname(buf.st_rdev, S_IFCHR)); printf("fdevname is /dev/%s ", fdevname(fd)); SEE ALSO
stat(2) HISTORY
The devname() function appeared in 4.4BSD. The fdevname() function appeared in FreeBSD 8.0. BSD
February 22, 2005 BSD
Man Page

8 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

df command

Hello All, need help with the df command.... If I do this: df -kh /var Filesystem Size Used Avail Use% Mounted on /dev/sda15 17G 5.8G 9.9G 38% /var How can I display, in the same way, the usage of each directory inside the /var? thanks for the help! (2 Replies)
Discussion started by: pmpx
2 Replies

2. AIX

/dev/hd9var full

/dev/hd9var 819200 1928 100% 12101 12% /var the filesystem is full my self being new to aix what do i do to create space (1 Reply)
Discussion started by: freeman
1 Replies

3. Programming

How to read flags from mode_t type?

Hello, After, I stat() a file, how can I read the various permissions flags from the st_mode variable which is of type mode_t? I would like to do something like: struct stat *perms; int res = stat(filename, perms); if(perms->st.mode == S_IROTH) do something; but I know that is the wrong... (2 Replies)
Discussion started by: pallak7
2 Replies

4. UNIX for Dummies Questions & Answers

/dev/null 2>&1 Versus /dev/null 2>1

How are these two different? They both prevent output and error from being displayed. I don't see the use of the "&" echo "hello" > /dev/null 2>&1 echo "hello" > /dev/null 2>1 (3 Replies)
Discussion started by: glev2005
3 Replies

5. Solaris

Modify /var/run.

Hello, I want to modify the /var/run fs from 86G to say 2G. How to go about it? Thanks. swap 64G 38K 64G 1% /var/run Regards. Edit/Delete Message (6 Replies)
Discussion started by: mahive
6 Replies

6. Shell Programming and Scripting

find command help.

I want to run a find command on the UNIX directory for all type -c and type -b files, then verify they are located in the default /dev directory. Problem is I get such a huge list of files when I run the search, I think it would be easier if I simply did a search for all type -c and type -b... (6 Replies)
Discussion started by: Lucisama
6 Replies

7. Shell Programming and Scripting

delete files from var ?

Hi all, $ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/VolGroup00-LogVol00 380807 149651 211496 42% / /dev/sda1 101086 13235 82632 14% /boot none 1947736 0 1947736 0%... (0 Replies)
Discussion started by: aish11
0 Replies

8. Shell Programming and Scripting

get "c" which is in "a" but not in "b"

$echo $a /dev/sda1 /dev/sda2 /dev/sda3 /dev/sda4 /dev/sda5 $echo $b /dev/sda1 /dev/sda5 I want get "c" which is in "a" but not in "b" (4 Replies)
Discussion started by: yanglei_fage
4 Replies