NAME
mkdir - make directories
SYNOPSIS
mkdir [OPTION]...DIRECTORY...
DESCRIPTION
Create the DIRECTORY(ies),if they do not already exist.
Mandatory arguments to long options are mandatory for short options too.
a.)mandatory ['mndtri] adj. 强制的;托管的;命令的;
b.)arguments 参数
-m, --mode=MODE
set file mode (as in chmod), not a=rwx - umask
a.)chomod n. 更改文件属性;档案权限,修改文件权限;改变文件存取方式
b.)umask 设置文件权限掩码
fo example:
[root@web ~]# mkdir -m 775 c
[root@web ~]# ll
[root@web ~]# drwxrwxr-x. 2 root root 4096 Nov 26 03:18 c
-p, --parents
no error if existing, make parent directories as needed
such as:
[root@web ~]# mkdir -p /data/d/c/b/a
-v, --verbose [v'bos] 冗长的 详细的
print a message for each created directory
for example:
[root@web ~]# mkdir -v /data/abc
mkdir: created directory '/data/abc [root@web ~]# ll
[root@web ~]# drwxrwxr-x. 2 root root 4096 Nov 26 03:18 c
-z, --context=CTX
set the SELinux security context of each created directory to CTX
a.) selinux [Security-Enhanced Linux] security 美 [s'kjrti]n. 安全;保证;证券;抵押品adj. 安全的;保安的;保密的
b.)Enhanced 美 [n'hnst]adj. 加强的;增大的v. 提高;加强(enhance的过去分词)
c.)context 美 ['kɑntkst]n. 环境;上下文;来龙去脉
-z参数不懂,不知道你们是怎么弄明白的,希望能给我举个例子!