mkdir

For filesystem.

Create directories, with intermediary directories if required using uutils/coreutils mkdir.

Command Type

built-in

Signature

> mkdir {flags} ...rest

Flags

  • --verbose, -v: Print a message for each created directory.

Parameters

  • ...rest: The name(s) of the path(s) to create.

Input/output types:

input output
nothing nothing
nothing table<path: string, created: bool, error: oneof<nothing, string>>

Examples

Make a directory named foo.

> mkdir foo

Make multiple directories and show the paths created.

> mkdir -v foo/bar foo2
╭───┬─────────┬─────────┬───────╮
│ # │  path   │ created │ error │
├───┼─────────┼─────────┼───────┤
│ 0 │ foo/bar │ true    │       │
│ 1 │ foo2    │ true    │       │
╰───┴─────────┴─────────┴───────╯

Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.