terminal.cab
No.
7
Date
Learning goal
Terminal Start, lesson 4
Level
2 of 3

Command of the day No. 7: mkdir -p

Purpose: Creates a folder and every missing folder above it.

Syntax: mkdir -p path/to/folder

Example:

mkdir -p projects/site/css
ls projects/site
css

Output from the simulator, as on a real Linux.

Options:

sudo: Outside your home folder, for example in /opt, you need sudo mkdir.

Try it in the terminal Share image

Fills in the command. Nothing runs until you press Enter.

Command of the day No. 7: mkdir -p. Purpose: Creates a folder and every missing folder above it. Example: mkdir -p projects/site/css; ls projects/site. Caution: mkdir -p stays silent: a typo creates a second folder tree without any warning. Check first: ls shows whether the folder already exists and how it is spelled. Remember: -p builds the whole path in one go.
The same card as an image, 1080 x 1350 pixels.

Today's card ยท All cards so far