mkdir recursive code example

Example 1: php mkdir recursive

<?php
// Create a directory recursively (make sure to sanitize if taken from input as always!)
mkdir("/path/to/my/dir", 0777, true);

Example 2: make recursive directory linux

mkdir -p file/sub_file/subfile2

Example 3: mkdir

sudo mkdir /usr/local/sbin

what that dose is make a new file at /usr/local/sbin

Example 4: mkdir recursive

$ mkdir -R foo/bar/zoo/andsoforth
or
$ mkdir -p foo/bar/zoo/andsoforth

Example 5: mkdir command

#usage:
mkdir <name>

#also it can be abbreviated to:
md <name>#in cmd(windows)

#it creates a folder with name <name>

Example 6: bash make recursive directory

mkdir -p "$BACKUP_DIR/$client/$year/$month/$day"