mkdir

mkdir (BSD) Cheatsheet #

The mkdir command is used to create directories in Unix-like operating systems.

Basic Commands #

Command/OptionExampleDescription
mkdir dirmkdir newdirCreate a directory named newdir
mkdir -p dir/subdirmkdir -p parentdir/childdirCreate parent directories as needed
mkdir -m 755 dirmkdir -m 755 newdirCreate a directory with specified permissions
mkdir -v dirmkdir -v newdirVerbose mode, show each directory created

Advanced Options #

Command/OptionExampleDescription
mkdir -p dir/subdirmkdir -p parentdir/childdirCreate intermediate directories if they do not exist (same as GNU)
mkdir -m 755 dirmkdir -m 755 newdirCreate a directory with specific permissions (same as GNU)
mkdir -v dirmkdir -v newdirShow the directory creation process in detail (same as GNU)

This cheatsheet provides key BSD mkdir options for creating directories.

mkdir

Explore our comprehensive cheatsheets to enhance your knowledge and efficiency. Each cheatsheet provides detailed command options, examples, and descriptions to help you master various tools and technologies.