Linux 之创建工作目录 |
您所在的位置:网站首页 › linux建立子目录 › Linux 之创建工作目录 |
在Linux下创建工作目录,一般使用 “mkdir" 指令,以下将介绍“mkdir”指令的使用方法,供大家参考。 一、使用帮助 在Linux终端(命令行)输入:mkdir --help,输出如下信息: Usage: mkdir [OPTION]... DIRECTORY...Create the DIRECTORY(ies), if they do not already exist. Mandatory arguments to long options are mandatory for short options too. -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 GNU coreutils online help: For complete documentation, run: info coreutils 'mkdir invocation' 二、mkdir 各参数说明 语法:mkdir [OPTION]... DIRECTORY... 条件:要创建的目录DIRECTORY不存在,否则将会报错 参数: -m 设定创建目录的权限,其权限模式同 "chmod",r=4, w=2, x=1; -p 递归创建目录,如果子目录的父目录已存在,也不会报错;若子目录存在,也不会报错,且不会覆盖已存在的子目录中的数据文件; -v 逐个显示要创建的目录的信息,描述每一个新创建的目录; -Z 设置目录的 SELinux 安全上下文信息; --help 提供帮助信息; --version 描述版本号。 实例: 1 mkdir -m 0775 test01 2 mkdir -p /home/bin/test02 3 mkdir -v test03 4 mkdir -m 0555 -p -v /home/lbin/test/test01/test02 mkdir: created directory ‘/home/liupf/test/test01’ mkdir: created directory ‘/home/liupf/test/test01/test02’ 本文永久更新链接地址:http://www.linuxidc.com/Linux/2016-10/136463.htm ![]() |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |