189 8069 5689

Linuxmkdir与mkdir-p的区别

目录:

成都创新互联专注为客户提供全方位的互联网综合服务,包含不限于成都做网站、成都网站建设、成都外贸网站建设、静乐网络推广、重庆小程序开发公司、静乐网络营销、静乐企业策划、静乐品牌公关、搜索引擎seo、人物专访、企业宣传片、企业代运营等,从售前售中售后,我们都将竭诚为您服务,您的肯定,是我们最大的嘉奖;成都创新互联为所有大学生创业者提供静乐建站搭建服务,24小时服务热线:18982081108,官方网址:www.cdcxhl.com

/home/s/Documents/Practice/Linux

mkdir : 如果存在上级目录不存在的情况,会无法创建下级目录, 会提出ERROR

s@s:~/Documents/Practice/Linux$ mkdir opt/abc
mkdir: cannot create directory ‘opt/abc’: No such file or directory

mkdir -p :递归创建目录,即使上级目录不存在,会按目录层级自动创建目录

s@s:~/Documents/Practice/Linux$ mkdir -p opt/abc
s@s:~/Documents/Practice/Linux$ ls
opt
s@s:~/Documents/Practice/Linux$ cd opt/
s@s:~/Documents/Practice/Linux/opt$ ls
abc
s@s:~/Documents/Practice/Linux/opt$ cd abc/
s@s:~/Documents/Practice/Linux/opt/abc$ ls
s@s:~/Documents/Practice/Linux/opt/abc$

网页名称:Linuxmkdir与mkdir-p的区别
文章来源:http://cdxtjz.cn/article/jcippc.html

其他资讯