创建多个目录
[root@hexingxing ~]# mkdir 1 2 3
[root@hexingxing ~]# ll
总用量 116
drwxr-xr-x. 2 root root  4096 10 月  1 18:17 1
drwxr-xr-x. 2 root root  4096 10 月  1 18:17 2
drwxr-xr-x. 2 root root  4096 10 月  1 18:17 3
// 创建文件夹 1、文件夹 2、文件夹 3

创建多层路径目录
[root@hexingxing ~]# mkdir -p 1/2/3
[root@hexingxing ~]# tree 1
1
└── 2
    └── 3

2 directories, 0 files
//创建文件夹路径 1/2/3

创建指定权限的目录
[root@hexingxing ~]# mkdir -m 777 newc
[root@hexingxing ~]# ll
总用量 120
drwxr-xr-x. 3 root root  4096 10 月  1 18:19 1
drwxr-xr-x. 2 root root  4096 10 月  1 18:17 2
drwxr-xr-x. 2 root root  4096 10 月  1 18:17 3
drwxrwxrwx. 2 root root  4096 10 月  1 18:21 newc
// 创建权限为 drwxrwxrwx(777)的目录


何星星原创文章仅用于个人学习,当前页面暂不支持复制操作,了解详情或文章转载请 点此 继续!

0 条评论

发表回复

Avatar placeholder

您的电子邮箱地址不会被公开。 必填项已用*标注