]> git.saurik.com Git - apple/file_cmds.git/blame - mknod/mknod.8
file_cmds-264.50.1.tar.gz
[apple/file_cmds.git] / mknod / mknod.8
CommitLineData
44a7a5ab
A
1.\" $NetBSD: mknod.8,v 1.15 1998/09/11 07:20:48 mycroft Exp $
2.\"
3.\" Copyright (c) 1980, 1991, 1993
4.\" The Regents of the University of California. All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution.
14.\" 3. All advertising materials mentioning features or use of this software
15.\" must display the following acknowledgement:
16.\" This product includes software developed by the University of
17.\" California, Berkeley and its contributors.
18.\" 4. Neither the name of the University nor the names of its contributors
19.\" may be used to endorse or promote products derived from this software
20.\" without specific prior written permission.
21.\"
22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32.\" SUCH DAMAGE.
33.\"
34.\" @(#)mknod.8 8.2 (Berkeley) 12/11/93
35.\"
36.Dd September 11, 1998
37.Dt MKNOD 8
38.Os NetBSD 1.4
39.Sh NAME
40.Nm mknod
41.Nd make device special file
42.Sh SYNOPSIS
43.Nm
44.Op Fl F Ar format
45.Ar name
46.Op Cm c | Cm b
47.Ar major minor
f383e97b 48.Nm
44a7a5ab
A
49.Op Fl F Ar format
50.Ar name
51.Op Cm c | Cm b
52.Ar major unit subunit
f383e97b 53.Nm
44a7a5ab
A
54.Ar name
55.Op Cm c | Cm b
56.Ar number
864a4b6e
A
57.Nm
58.Ar name
59.Ar w
44a7a5ab
A
60.Sh DESCRIPTION
61The
62.Nm
63command creates device special files.
44a7a5ab
A
64.Pp
65To make nodes manually, the required arguments are:
66.Pp
67.Bl -tag -width majorx
68.It Ar name
69Device name, for example
70.Dq sd
71for a SCSI disk on an HP300 or a
72.Dq pty
73for pseudo-devices.
864a4b6e 74.It Cm b | Cm c | Cm w
44a7a5ab
A
75Type of device. If the
76device is a block type device such as a tape or disk drive which needs
77both cooked and raw special files,
78the type is
79.Cm b .
864a4b6e
A
80Whiteout nodes are type
81.Cm w .
44a7a5ab
A
82All other devices are character type devices, such as terminal
83and pseudo devices, and are type
84.Cm c .
85.It Ar major
86The major device number is an integer number which tells the kernel
40bf83fe 87which device driver entry point to use.
44a7a5ab
A
88.It Ar minor
89The minor device number tells the kernel which one of several similar
90devices the node corresponds to; for example, it may be a specific serial
91port or pty.
92.It Ar unit and subunit
93The unit and subunit numbers select a subset of a device; for example, the
94unit may specify a particular SCSI disk, and the subunit a partition on
95that disk. (Currently this form of specification is only supported by the
96.Ar bsdos
97format, for compatibility with the
98.Bsx
40bf83fe 99.Xr mknod 8 . )
44a7a5ab
A
100.El
101.Pp
102Device numbers for different operating systems may be packed in a different
103format. To create device nodes that may be used by such an operating system
104(e.g. in an exported file system used for netbooting), the
105.Fl F
106option is used. The following formats are recognized:
107native,
108386bsd,
1094bsd,
110bsdos,
111freebsd,
112hpux,
113isc,
114linux,
115netbsd,
116osf1,
117sco,
118solaris,
119sunos,
120svr3,
121svr4 and
122ultrix.
123.Pp
124Alternatively, a single opaque device number may be specified.
125.Sh SEE ALSO
126.Xr mkfifo 1 ,
127.Xr mkfifo 2 ,
40bf83fe 128.Xr mknod 2
44a7a5ab
A
129.Sh HISTORY
130A
131.Nm
132command appeared in
133.At v6 .
134The
135.Fl F
136option appeared in
137.Nx 1.4 .