The mkdir command
make directories 10 examples from the lessons of the IVski Linux Playground — try them in the terminal next to them.
Options in the examples
-p, --parents- no error if existing, make parent directories as needed, with their file modes unaffected by any -m option
Examples
mkdir projects
mkdir -p projects/website/cssCreate nested directories at once
mkdir -p "$1" && cd "$1"
mkdir -p "$BACKUP_DIR"
mkdir myproject
sudo mkdir -p /var/www/shop
mkdir -p jpg && mv "$f" jpg/Quotes keep "holiday photo.jpg" one name
mkdir -p ~/reports
mkdir /home/NAME/projects
mkdir -p /var/www/releases/v2
Lessons that use mkdir
- touch & mkdir — Creating Files and Directories
- Aliases — Command Shortcuts
- Your First Script
- git init & git status
- Configuration & Server Blocks
- Project: Tidy the Downloads Folder
- Project: Daily Log Report
- Project: New Teammate Script
- Project: Deploy with Rollback