Added new command 'mkdir' (#18796)

This commit is contained in:
Amit Sharma
2018-10-16 17:00:13 +05:30
committed by Kristofer Koishigawa
parent bba161afbc
commit d279f8e413

View File

@ -4,10 +4,19 @@ title: Bash mkdir
## Bash command: mkdir
**Creates a directory**
**Make a Directory** ,for example `mkdir hello`.
```
mkdir directory_name
```
**Creating missing directories in the path**, let's say we need to create a directory `dir` in the path a/b/c/dir, but directory `b` and `c` don't exist. In this case, `mkdir -p a/b/c/dir` will create the missing directories in the path.
Make directory(ies) with the provided name if they do not already exist.
Commonly used options:
- `-p` no error if existing, make parent directories as needed.
- `-v` prints message for each created directory.
Let's say we need to create a directory `dir` in the path `a/b/c/dir`, but directory `b` and `c` don't exist. In this case, `mkdir -p a/b/c/dir` will create the missing directories in the path.
### More Information:
* [Wikipedia](https://en.wikipedia.org/wiki/Mkdir)
* [Wikipedia - Mkdir](https://en.wikipedia.org/wiki/Mkdir)