mkdir Command in Linux

Post image

mkdir Command helps create new directories if the directory present already doesn’t create new directories and gives a warning message inside the terminal.

Syntax:

mkdir [OPTION]... DIRECTORY...
mkdir command output

Command Options

mkdir -m=Mode linuxBook-m Option help to assign new permission on creating time (Like in chmod)

Mode Options:

  • rwx: read-write execute permission on this file
  • wx: only write execute permission on this file
  • rx: only Read execute permission on this file
  • rw: only Read execute permission on this file
mkdir -m option output

mkdir -p or mkdir –parents -p option does not show an error if the directory exists. Also, the directory that exists then overwrites your directory. Your directory does not exist, then create a new directory.

mkdir -p option output

mkdir -v or mkdir –verbose check working behind mkdir command and print a message in the terminal after each created directory

mkdir -v flag output

mkdir –help display this help and exit

mkdir –help flag output

mkdir –version output mkdir command version information.

mkdir –version flag output

man mkdir print mkdir manual page Information Inside Your Cmd Tool.

man mkdir output

Contact me

You May Also Like

comments powered by Disqus