The “mkdir” command

Use this command to create one or more new directories.

Include one or more instances of the “<DIRECTORY” variable (separating each with a whitespace), and set each to the complete path to the new directory to be created.


If directories within a named path do not exist, an error will be generated. To have CMShell automatically create non-existent directories in a path, be sure to include the -p or --parents option (as discussed in the table below).

Important: NetStorage directories can't be renamed. Ensure that all directory names used with this command are specifically what you want before executing the command.

Example usage

Command description Command and output
Example creation of a single directory using mkdir with the verbose -v option.
[writingteam /]$ mkdir -v films
mkdir: created directory `films'
Example creation of nested directory structure. The -p option will create any folders that don't already exist. This example combines mkdir with the -p option.
[writingteam /]$ mkdir -p /tv/shows/

Available options

The “<OPTION>” variable displayed in the above example can be populated with any of the following options:

Option Description
-p, --parents If parent directories in the specified path do not exist, automatically generate them to accommodate (and do not generate an error).
-v, --verbose Display the operation’s execution step by step.
-h, --help Display help information for this command.
Note: The -p and -v options can't be used together.