[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: rmdir -p
On Tue, 20 May 2008 00:52:52 +0900 (JST)
Takahiro Kambe <taca%back-street.net@localhost> wrote:
> > But is it an error? If the intention is to remove a directory and any
> > otherwise empty parents and that's what it does, why throw an error?
> For ignoring such a error, it reminds me that -f option of rm(1).
Given that the idea is to prune empty directories, rm(1) seems like a
bad idea regardless of options. No, the intention is quite clear;
check a named directory and if it is empty then remove it and do that
recursively for the directory it was in until a non-empty directory is
reached and then stop.
I guess the only fix here is to add a hyphen to the command to ignore
the error returned. As it turns out, that's exactly what is in the file.
Somehow I removed it while playing around with the Makefile for another
D'Arcy J.M. Cain <darcy%NetBSD.org@localhost>
Main Index |
Thread Index |