mkdir

mkdir (GNU) 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 --mode=755 dirmkdir --mode=755 newdirCreate a directory with specific permissions (alternative syntax)
mkdir --parents dir/subdirmkdir --parents parentdir/childdirCreate intermediate directories if they do not exist
mkdir --verbose dirmkdir --verbose newdirShow the directory creation process in detail

This cheatsheet covers essential GNU 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.