Linuxmkdir与mkdir-p的区别-成都快上网建站

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://kswjz.com/article/jcippc.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流