Format
>>-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 0–7,
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
- 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.
- 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.
- 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"