脚本中mkdir 与 mkdir -p 的区别

(转载)脚本中mkdir 与 mkdir -p 的区别_weixin_42445727的博客-CSDN博客_mkdir -p  https://blog.csdn.net/weixin_42445727/article/details/88134102

1、直接用mkdir指令

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

 

mkdir -p xx/yy的好处就是一次可以创建多级文件夹,若xx文件夹不存在,则先创建xx文件夹,然后在xx文件夹下创建yy文件夹

posted @ 2020-06-20 19:38  西伯利亚虎  阅读(200)  评论(0编辑  收藏  举报

Permanence, perseverance and persistence in spite of all obstacles, discouragements and impossibilities: It is this, that in all things distinguishes the strong soul from the weak.