From ea7442072d36b7e62837d755d004b2f978573e60 Mon Sep 17 00:00:00 2001 From: doomcrewinc Date: Fri, 14 Dec 2018 20:10:47 -0700 Subject: [PATCH] Added in an additional use of mkdir. (#24939) Added in the ability to create multiple directories at a given level via usage of curly brackets {} --- guide/english/bash/bash-mkdir/index.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/guide/english/bash/bash-mkdir/index.md b/guide/english/bash/bash-mkdir/index.md index d1f55f4c3f..debddd5e16 100644 --- a/guide/english/bash/bash-mkdir/index.md +++ b/guide/english/bash/bash-mkdir/index.md @@ -16,7 +16,19 @@ 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. +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. + +You can also create multiple directories at a given level. Picture the following directory structure: +``` +. +└── wwwroot + ├── css + ├── images + └── media + ├── mp3 + └── mp4 +``` +This can easily be recreated `mkdir -p wwwroot/{css,images,media/{mp4,mp3}}` By using curly braces `{}` you can create multiple directories at a given level. ### More Information: * [Wikipedia - Mkdir](https://en.wikipedia.org/wiki/Mkdir)