mkdir
The mkdir (make directory) command in the Unix, DOS, FlexOS, OS/2, Microsoft Windows, and ReactOS operating systems is used to make a new directory.
mkdir [-mp] name_of_directory
-m:配置文件夾的權限,直接設定,忽略預設權限 (umask)。
-p:幫助你直接將所需要的目錄 (包含上層目錄) 遞歸建立起來。
An example of -p
in action is:
mkdir -p /tmp/a/b/c
If /tmp/a
exists but /tmp/a/b
does not, mkdir
will create /tmp/a/b
before creating /tmp/a/b/c
.