OS Manuals

/usr/bin/mkdir

Cross-platform Rust rewrite of the GNU coreutils.

From uutils 0.12.0-r6 (os), captured 2026-11-07 by running mkdir --help (exit 0). permalink

Create the given DIRECTORY(ies) if they do not exist

Usage: mkdir [OPTION]... DIRECTORY...

Arguments:
  <dirs>...

Options:
  -m, --mode <mode>    set file mode (not implemented on windows)
  -p, --parents        make parent directories as needed
  -v, --verbose        print a message for each printed directory
  -Z                   set SELinux security context of each created directory to the default type
      --context <CTX>  like -Z, or if CTX is specified then set the SELinux or SMACK security
                       context to CTX
  -h, --help           Print help
  -V, --version        Print version

Each MODE is of the form [ugoa]*([-+=]([rwxXst]*|[ugo]))+|[-+=]?[0-7]+.
Options (7)
OptionDescriptionSource
-m, --mode modeset file mode (not implemented on windows)help + man
-p, --parentsmake parent directories as neededhelp + man
-v, --verboseprint a message for each printed directoryhelp + man
-Zset SELinux security context of each created directory to the default typehelp + man
--context CTXlike -Z, or if CTX is specified then set the SELinux or SMACK security context to CTXhelp + man
-h, --helpPrint helphelp + man
-V, --versionPrint versionhelp + man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.