Commit | Line | Data |
---|---|---|
bcf1365c | 1 | /* |
e7e5aa72 KB |
2 | * Copyright (c) 1983 The Regents of the University of California. |
3 | * All rights reserved. | |
4 | * | |
27c71911 | 5 | * %sccs.include.redist.c% |
bcf1365c DF |
6 | */ |
7 | ||
8 | #ifndef lint | |
9 | char copyright[] = | |
e7e5aa72 | 10 | "@(#) Copyright (c) 1983 The Regents of the University of California.\n\ |
bcf1365c | 11 | All rights reserved.\n"; |
e7e5aa72 | 12 | #endif /* not lint */ |
bcf1365c DF |
13 | |
14 | #ifndef lint | |
27c71911 | 15 | static char sccsid[] = "@(#)rmdir.c 5.3 (Berkeley) %G%"; |
e7e5aa72 | 16 | #endif /* not lint */ |
bcf1365c | 17 | |
ff487e30 BJ |
18 | /* |
19 | * Remove directory | |
20 | */ | |
ff487e30 BJ |
21 | #include <stdio.h> |
22 | ||
e7e5aa72 | 23 | main(argc, argv) |
a645d56b SL |
24 | int argc; |
25 | char **argv; | |
ff487e30 | 26 | { |
e7e5aa72 | 27 | int errors; |
ff487e30 | 28 | |
a645d56b | 29 | if (argc < 2) { |
e7e5aa72 | 30 | fprintf(stderr, "usage: rmdir directory ...\n"); |
ff487e30 BJ |
31 | exit(1); |
32 | } | |
e7e5aa72 KB |
33 | for (errors = 0; *++argv;) |
34 | if (rmdir(*argv) < 0) { | |
4738961c | 35 | fprintf(stderr, "rmdir: "); |
e7e5aa72 KB |
36 | perror(*argv); |
37 | errors = 1; | |
a645d56b | 38 | } |
e7e5aa72 | 39 | exit(errors); |
ff487e30 | 40 | } |