12. mkdir (Make Directory)
Lesson Content
We’re gonna need some directories to store all these files we’ve been working on. The mkdir command (Make Directory) is useful for that, it will create a directory if it doesn’t already exist. You can even make multiple directories at the same time.
$ mkdir books paintings
You can also create subdirectories at the same time with the -p (parent flag).
$ mkdir -p books/hemmingway/favorites
Exercise
Make a couple of directories and move some files into that directory.
Quiz Question
# What command is use to make a directory?
> It reports an error if DIRECTORY already exists, unless the -p option is given.
1. [ ] folder
2. [ ] dir
3. [ ] create
4. [x] mkdir