ODOC: mkdir

mkdir — MaKe DIRectories.

Summary :

mkdir Create the DIRECTORY(ies) with the specified names, if they do not already exist.

Examples :

$ mkdir dir1 — Create a dir1, if dir1 is NOT an existing file or directory.

$ mkdir dir1 dir2 dir3 — Create 3 Directories.

$ mkdir -m 744 dir1 — Create a dir1 with specified permission mode.

$ mkdir -p dir1/dir2/dir3 — Make any missing parent directories for each argument. Suppose if dir1 or dir2 is NOT exist, then that dir will be created before creating the dir3.

$ mkdir -v dir1/dir2/dir3 — Print a message for each created dir.

Read : man mkdir

Tech Tags: linux