don't worry about permissions, just move the file into place
[unix-history] / usr / src / bin / rmdir / rmdir.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[] = "@(#)rmdir.c 5.1 (Berkeley) %G%";
15#endif not lint
16
ff487e30
BJ
17/*
18 * Remove directory
19 */
ff487e30
BJ
20#include <stdio.h>
21
ff487e30 22main(argc,argv)
a645d56b
SL
23 int argc;
24 char **argv;
ff487e30 25{
a645d56b 26 int errors = 0;
ff487e30 27
a645d56b 28 if (argc < 2) {
359bd7c5 29 fprintf(stderr, "usage: %s directory ...\n", argv[0]);
ff487e30
BJ
30 exit(1);
31 }
a645d56b
SL
32 while (--argc)
33 if (rmdir(*++argv) < 0) {
4738961c 34 fprintf(stderr, "rmdir: ");
a645d56b
SL
35 perror(*argv);;
36 errors++;
37 }
38 exit(errors != 0);
ff487e30 39}