Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

mknod - make an inode

&pagelevel(4)&pagelevel

The command mknod creates a directory entry for a special file.


Syntax


Format 1: mknod name[ b|c] device_class device_number
Format 2: mknod name p



Format 1:mknod name[ b|c] device_class device_number


Only the POSIX administrator may enter this format.


name

Name of the special file which is to be created

b

for a block-oriented special file

c

for a character-oriented special file

device_class device_number

Number of the device class. This may be entered in octal or decimal notation. You must enter a leading zero if you choose octal notation. The device number assignment is system-specific.

Example of possible device classes (major device number):

58

Terminal file (/dev/term/...)

59

SF terminal file (/dev/sf/...)

(SYSFILE is used to access terminals from within BS2000 batch procedures)


It is not sufficient merely to create the TERM and SF special files. The appropriate POSIX parameters also have to be set if these files are to be used:

File:

  $TSOS.SYSSSI.POSIX-BC.nnn  (nnn = version, see the manual "POSIX Basics for Users and System Administrators" [1])
Parameters:
  NOTTY   Maximum number of terminal connections that can be used
  NOSSTY Maximum number of SF terminal connections that can be used
These parameters only take effect when you restart the POSIX subsystem.



Format 2: mknod name p


name

Name of the special file

p

Generates a FIFO file (known as a pipe)

Example

Creating an additional special file (/dev/term). This example was conducted under the POSIX administrator’s ID.

# cd /dev/term

# ls -l /dev/term/511

crw-rw-rw- 1 SYSROOT  TTY   58,511 Jan 14 2008 /dev/term/511
# mknod /dev/term/512 c 58 512

# chmod a+w /dev/term/512

# ls -l /dev/term/512
crw-rw-rw- 1 SYSROOT SYSROOT 58,512 Jan 27 14:14 /dev/term/512

See also

mknod [4]