【Linux 命令】mkdir

查看帮助
$ mkdir --help

Usage
mkdir [OPTION]... DIRECTORY...

Option

-m, --mode=MODE   set file mode (as in chmod), not a=rwx - umask
-p, --parents     no error if existing, make parent directories as needed
-v, --verbose     print a message for each created directory
-Z                set SELinux security context of each created directory to the default type
    --context[=CTX]  like -Z, or if CTX is specified then set the SELinux or SMACK security context to CTX
    --help     display this help and exit
    --version  output version information and exit

实用命令
mkdir -m 700 -p /test/test1
-m 700 表示仅owner有rwx权限
-p /test/test1 表示递归创建文件,即先创建test,再创建test1

参考资料
https://www.cnblogs.com/zhongguiyao/p/9169361.html
https://blog.csdn.net/Simon_coder/article/details/78660978/

posted @ 2021-06-02 23:09  林東雨  阅读(291)  评论(0编辑  收藏  举报