Linux创建多个目录及多级目录


 description

在Linux下创建test下的a目录,和test2下的a,b,c目录。

 command

mkdir -p -v test/a test2/{a,c,c}

 parameter

mkdir : 创建文件夹
-p, --parents : 如果已存在不报错,根据需要自动创建父目录
-v,--verbose : 为创建的每个目录显示一条消息

 result

mkdir: created directory 'test'
mkdir: created directory 'test/a'
mkdir: created directory 'test2'
mkdir: created directory 'test2/a'
mkdir: created directory 'test2/c'

I hope to help every developer quickly find the commands they need. Of course, you can also add your own commonly used commands for easy searching.