Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

mknod

Some strings on this page have not been translated yet. You can help by translating them on Weblate.
v0.13.0
mknod [OPTION]... NOM TYPE [MAJEUR MINEUR]

Créer le fichier spécial NOM du TYPE donné.

Options

--mode=<MODE>, -m <MODE>

set file permission bits to MODE, not a=rw - umask

name of the new file

type of the new file (b, c, u or p)

major device number

minor device number

-Z

set SELinux security context of the created file to the default type

--context=<CTX>

like -Z, or if CTX is specified then set the SELinux or SMACK security context to CTX

Les arguments obligatoires pour les options longues le sont aussi pour les options courtes. -m, –mode=MODE définir les bits de permission de fichier à MODE, pas a=rw - umask

MAJEUR et MINEUR doivent tous deux être spécifiés quand TYPE est b, c, ou u, et ils doivent être omis quand TYPE est p. Si MAJEUR ou MINEUR commence par 0x ou 0X, il est interprété comme hexadécimal ; sinon, s’il commence par 0, comme octal ; sinon, comme décimal. TYPE peut être :

  • b créer un fichier spécial bloc (mis en mémoire tampon)
  • c, u créer un fichier spécial caractère (non mis en mémoire tampon)
  • p créer un FIFO

NOTE : votre shell peut avoir sa propre version de mknod, qui remplace généralement la version décrite ici. Veuillez vous référer à la documentation de votre shell pour les détails sur les options qu’il supporte.

Examples

The examples have not been translated yet and are shown in English. You can help by translating them on tldr-pages.

Create a block device:

sudo mknod {{path/to/device_file}} b {{major_device_number}} {{minor_device_number}}

Create a character device:

sudo mknod {{path/to/device_file}} c {{major_device_number}} {{minor_device_number}}

Create a FIFO (queue) device:

sudo mknod {{path/to/device_file}} p

Create a device file with default SELinux security context:

sudo mknod {{[-Z|--context]}} {{path/to/device_file}} {{type}} {{major_device_number}} {{minor_device_number}}

The examples are provided by the tldr-pages project under the CC BY 4.0 License.

Please note that, as uutils is a work in progress, some examples might fail.