z/OS Using REXX and z/OS UNIX System Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


mknod

z/OS Using REXX and z/OS UNIX System Services
SA23-2283-00

Format

Read syntax diagramSkip visual syntax diagram
>>-mknod--pathname--mode--major--minor-------------------------><

Purpose

mknod invokes the mknod callable service to create a new character special file. You must be a superuser to use this function.

Parameters

pathname
A path name for the file.
mode
A three- or four-digit number, corresponding to the access permission bits. Each digit must be in the range 07, and at least three digits must be specified. For more information on permissions, see Setting permissions for files and directories.
major
The device major number corresponds to a device driver supporting a class of devices (for example, interactive terminals). For information on specifying the device major number, see Creating special files in z/OS UNIX System Services Planning.
minor
The number that corresponds to a specific device within the class of devices referred to by the device major number. For information on specifying the device minor number, see Creating special files in z/OS UNIX System Services Planning.

Usage

  1. The file permission bits specified in mode are modified by the process's file creation mask (see umask), and then used to set the file permission bits of the file being created.
  2. The file's owner ID is set to the process's effective user ID (UID). The group ID is set to the group ID (GID) of the directory containing the file.
  3. The mknod service sets the access, change, and modification times for the new file. It also sets the change and modification times for the directory that contains the new file.

Examples

To create /dev/null with read-write-execute permission for everyone:
ISearchByExample"mknod /dev/null 777 4 0"

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014