MKDIR(1) General Commands Manual MKDIR(1)

mkdirmake directories

mkdir [-pv] [-m mode] dir...

mkdir creates each given dir in the order specified.

mode
Set permission of new directories specified by dir, relative to a=rwx using the same format as chmod(1).
Parents mode, create missing directories present in the path given by dir. As required by POSIX, parents are created with u=wx|~umask as their default mode, ignoring -m mode.
Verbose mode, print each successfully made directory.

The mkdir utility exits 0 on success, and >0 if an error occurs.

chmod(1)

mkdir should be compliant with the IEEE Std 1003.1-2024 (“POSIX.1”) specification.

The -v option is an extension also present in GNU coreutils and FreeBSD.

Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>

2024-04-08 Linux 6.6.67-gentoo-x86_64