Rename boot_i386.8 to boot_pc32.8 by repo-copy in order to enable the
[dragonfly.git] / sbin / mknod / mknod.8
1 .\" Copyright (c) 1980, 1991, 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. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)mknod.8     8.2 (Berkeley) 12/11/93
33 .\" $FreeBSD: src/sbin/mknod/mknod.8,v 1.11.2.10 2003/03/04 15:16:19 keramida Exp $
34 .\" $DragonFly: src/sbin/mknod/mknod.8,v 1.4 2004/07/06 10:45:24 eirikn Exp $
35 .\"
36 .Dd December 11, 1993
37 .Dt MKNOD 8
38 .Os
39 .Sh NAME
40 .Nm mknod
41 .Nd build special file
42 .Sh SYNOPSIS
43 .Nm
44 .Ar name
45 .Op Cm c | Cm b
46 .Ar major minor
47 .Op Ar owner : Ns Ar group
48 .Sh DESCRIPTION
49 The
50 .Nm
51 utility creates device special files.
52 Normally the shell script
53 .Pa /dev/MAKEDEV
54 is used to create special files for commonly known devices; it executes
55 .Nm
56 with the appropriate arguments and can make all the files required for the
57 device.
58 .Pp
59 To make nodes manually, the four required arguments are:
60 .Pp
61 .Bl -tag -width indent
62 .It Ar name
63 Device name, for example
64 .Dq sd
65 for a SCSI disk on an HP300 or a
66 .Dq pty
67 for pseudo-terminals.
68 .It Cm b | Cm c
69 Type of device.
70 If the
71 device is a block type device such as a tape or disk drive which needs
72 both cooked and raw special files,
73 the type is
74 .Cm b .
75 All other devices are character type devices, such as terminal
76 and pseudo devices, and are type
77 .Cm c .
78 .It Ar major
79 The major device number is an integer number which tells the kernel
80 which device driver entry point to use.  To learn what
81 major device number to use for a particular device, check
82 .Pa /dev/MAKEDEV
83 or
84 .Pa /usr/src/sys/conf/majors .
85 .It Ar minor
86 The minor device number tells the kernel which subunit
87 the node corresponds to on the device; for example,
88 a subunit may be a file system partition
89 or a tty line.
90 .It Ar owner : Ns Ar group
91 The
92 .Ar owner
93 .Ar group
94 operand pair is optional, however, if one is specified, they both must be
95 specified.
96 The
97 .Ar owner
98 may be either a numeric user ID or a user name.
99 If a user name is also a numeric user ID, the operand is used as a
100 user name.
101 The
102 .Ar group
103 may be either a numeric group ID or a group name.
104 Similar to the user name,
105 if a group name is also a numeric group ID, the operand is used as a
106 group name.
107 .El
108 .Pp
109 Major and minor device numbers can be given in any format acceptable to
110 .Xr strtoul 3 ,
111 so that a leading
112 .Ql 0x
113 indicates a hexadecimal number, and a leading
114 .Ql 0
115 will cause the number to be interpreted as octal.
116 .Sh COMPATIBILITY
117 The
118 .Xr chown 8 Ns - Ns
119 like functionality is specific to
120 .Dx
121 /
122 .Fx
123 and was added so that
124 .Pa /dev/MAKEDEV
125 would not depend on
126 .Pa /usr
127 being mounted.
128 .Sh SEE ALSO
129 .Xr mkfifo 1 ,
130 .Xr mknod 2 ,
131 .Xr chown 8 ,
132 .Xr MAKEDEV 8
133 .Sh HISTORY
134 A
135 .Nm
136 utility appeared in
137 .At v6 .