Linux mkdir Command
The Linux mkdir (full English spelling: make directory) command is used to create directories.
Syntax
mkdir [-p] dirName
Parameter Description:
- -p Ensures the directory name exists; if it does not exist, create one.
Examples
In the working directory, create a subdirectory named example:
mkdir example
In the example2 directory under the working directory, create a subdirectory named test.
If the example2 directory does not originally exist, create one. (Note: In this example, if the -p parameter is not added and the example2 directory does not originally exist, an error will occur.)
mkdir -p example2/testOther Extensions
Linux Command Reference