mkdir(make directories)
mkdir(make directories)功能说明:建立目录
语 法:mkdir [-p][--help][--version][-m <目录属性>][目录名称]
补充说明:mkdir可建立目录并同时设置目录的权限。
参 数:
-m<目录属性>或--mode<目录属性> 建立目录时同时设置目录的权限。
-p或--parents 若所要建立目录的上层目录目前尚未建立,则会一并建立上层目录。
--help 显示帮助。
--verbose 执行时显示详细的信息。
--version 显示版本信息。
mkdir
mkdir [options] directories
Create one or more directories. You must have write permission in the parent directory in order to create a directory. See also rmdir. The default mode of the new directory is 0777, modified by the system or user's umask.
Options
Set the access mode for new directories. See chmod for an explanation of acceptable formats for mode.
Create intervening parent directories if they don't exist.
Print a message for each directory created.
Print help message and then exit.
Print version number and then exit.
Set security context in SELinux.
Examples
Create a read-only directory named personal:
mkdir -m 444 personal
The following sequence:
mkdir work; cd work mkdir junk; cd junk mkdir questions; cd ../..
can be accomplished by typing this:
mkdir -p work/junk/questions