【Linux 命令】mkdir

时间:2021-06-03 17:41:30   收藏:0   阅读:0

查看帮助
$ 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/

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!