add trackskew, interleave, npsect, headswitch, and trackseek
[unix-history] / usr / src / bin / mkdir / mkdir.c
CommitLineData
bcf1365c
DF
1/*
2 * Copyright (c) 1983 Regents of the University of California.
3 * All rights reserved. The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
5 */
6
7#ifndef lint
8char copyright[] =
9"@(#) Copyright (c) 1983 Regents of the University of California.\n\
10 All rights reserved.\n";
11#endif not lint
12
13#ifndef lint
14static char sccsid[] = "@(#)mkdir.c 5.1 (Berkeley) %G%";
15#endif not lint
16
fe19c180 17/*
a645d56b
SL
18 * make directory
19 */
20#include <stdio.h>
fe19c180
BJ
21
22main(argc, argv)
a645d56b 23 char *argv[];
fe19c180 24{
a645d56b 25 int errors = 0;
fe19c180 26
a645d56b 27 if (argc < 2) {
359bd7c5 28 fprintf(stderr, "usage: %s directory ...\n", argv[0]);
fe19c180
BJ
29 exit(1);
30 }
a645d56b
SL
31 while (--argc)
32 if (mkdir(*++argv, 0777) < 0) {
4738961c 33 fprintf(stderr, "mkdir: ");
a645d56b
SL
34 perror(*argv);
35 errors++;
36 }
37 exit(errors != 0);
fe19c180 38}