1 #include "types.h"
2 #include "stat.h"
3 #include "user.h"
4
5 int
6 main(int argc, char *argv[])
/* ![[previous]](../icons/n_left.png)
![[next]](../icons/n_right.png)
![[first]](../icons/n_first.png)
![[last]](../icons/n_last.png)
![[top]](../icons/top.png)
![[bottom]](../icons/bottom.png)
![[index]](../icons/index.png)
*/
7 {
8 int i;
9
10 if(argc < 2){
11 printf(2, "Usage: mkdir files...\n");
12 exit();
13 }
14
15 for(i = 1; i < argc; i++){
16 if(mkdir(argv[i]) < 0){
17 printf(2, "mkdir: %s failed to create\n", argv[i]);
18 break;
19 }
20 }
21
22 exit();
23 }