[Linux command] mkdir command option list [Must-see for beginners]

[Linux command] mkdir command option list [Must-see for beginners]

Summary Linux command list

What is the mkdir command?

A Linux command that creates a new directory. "mkdir" is an abbreviation for "make directory".

How to use commands

$mkdir directory name

#hoge directory creation
$ mkdir hoge

List of options for the mkdir command

option Description
-m Create a directory with permissions
-p Create if the described directory does not exist without displaying an error
-v Display the message as a result of creating the directory

-m option

$ mkdir -m Permission specification directory name

#Create a hoge directory with permissions of 666.
$ mkdir -m 666 hoge

-p option

If the directory you are trying to create exists in mkdir, an error will occur and the directory will not be created. If you recreate the directory even though it already exists, the contents of that directory will also be deleted. Also, mkdir will generate an error and the child directory will not be created even if the parent directory to be created does not exist. The -p option solves these problems. By specifying -p, you can create a child directory without displaying an error message even if the directory exists and leaving the existing directory as it is without creating a new one.

$ mkdir -p directory name

#If there is currently a hoge directory, ignore it, otherwise create a hoge directory.
$ mkdir -p hoge

List of options for other Linux commands

pwd, mkdir, cd , cat, cp, ls, touch, less, mv, rm, ssh, man, ** Adding at any time **

Advertising space

We undertake various development and construction contracts and mentor work for beginners. If you are interested, please go to ** here **

Recommended Posts

[Linux command] mkdir command option list [Must-see for beginners]
[Linux command] cp command option list [Must-see for beginners]
[Linux command] touch command option list [Must-see for beginners]
[Linux command] less command option list [Must-see for beginners]
[Linux command] cat command option list [Must-see for beginners]
[Linux command] pwd command option list [Must-see for beginners]
[Linux command] rm command option list [Must-see for beginners]
[Linux command] cd command option list [Must-see for beginners]
[Linux command] mv command option list [Must-see for beginners]
[Linux command] man command option list [Must-see for beginners]
[Linux command] ssh command option list [Must-see for beginners]
[Linux command summary] Command list [Must-see for beginners]
Linux command memorandum [for beginners]
[Must-see for beginners] Basics of Linux
Linux command list
Linux mkdir command
Linux operation for beginners Basic command summary
Linux command for self-collection
Linux distribution recommended for beginners
Linux Command Dictionary (for myself)
Python #list for super beginners
Convenient Linux shortcuts (for beginners)
Frequently used Linux commands (for beginners)
Linux command # 4
Linux command # 3
Linux command # 5
How to create a shortcut command for LINUX
linux at command
Roadmap for beginners
Linux command <Basic 2>
Linux [directory command]
Linux server command
Linux # Command Memo 1
Linux command [read]
Linux Command Summary
[Basic] linux command
Linux [shell command]
[Linux] Command / Knowledge
pyenv for linux
My linux command
Linux command collection
Linux command basics
[Linux] Git command
Linux (command memory)
[Linux] A list of Linux commands that beginners should know
[For beginners] How to use say command in python!
[Linux] Basics of authority setting by chmod for beginners