GNU bug report logs -
#12339
Bug: rm -fr . doesn't dir depth first deletion yet it is documented to do so.
Previous Next
Reported by: Linda Walsh <coreutils <at> tlinx.org>
Date: Mon, 3 Sep 2012 00:34:02 UTC
Severity: normal
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Eric Blake wrote:
>>> The rm utility is forbidden to remove the names dot and dot-dot in order to avoid the consequences of inadvertently doing something like:
>>> rm −r .*
---
Which is why, IMO, I thought rm -r .* should ask if they really want to remove
all files under "." as the first question, as it would show up first in such
a situation.
As stated before, I am more interested in the "-f"=force it anyway option,
that says to let it fail, and continue, ignoring failure.
I think that may be where the problem has been introduced.
I never used rm - .
Certainly rm ** is easier to mistype than rm -r .* so by that logic, that
should be disallowed as well?
I submit it is the behavior of "-f" that has changed -- and that it
used to mean "force" -- continue in spite of errors, and it is
that behavior that has changed, as I would would always have expected
rm -r . to at least return some error I didn't care about -- What I
wanted was the depth-first removal, and -f to force it to continue despite
errors.
How long has -f NOT meant "--force" -- as now it only overlooks write
protection errors which sounds very weak.
This bug report was last modified 6 years and 187 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.