bug#12339: Bug: rm -fr . doesn't dir depth first deletion yet it is docu
From:
Voelker, Bernhard
Subject:
bug#12339: Bug: rm -fr . doesn't dir depth first deletion yet it is documented to do so.
Date:
Mon, 3 Sep 2012 08:24:51 +0000
Bob Proulx wrote (Monday, September 03, 2012 9:51 AM)
> Jim Meyering wrote:
> > Could you be thinking of some other rm?
> > Coreutils' rm has rejected that for a long time:
> > ...
> > POSIX requires rm to reject any attempt to delete an explicitly specified
> > "." or ".." argument (or any argument whose last component is one of those):
>
> Hmm... Wow. I decided to check HP-UX 11.11, a now rather old release
> from twelve years ago in 2000, the oldest easily available to me, and
> got this:
>
> $ /usr/bin/rm -rf .
> rm: cannot remove .. or .
>
> So I guess GNU coreutils is in good company with traditional Unix
> systems! It has definitely been that way for a long time.
Seconded!
SunOS 5.9:
$ rm -rf .
$ rm -r .
rm of . is not allowed
Have a nice day,
Berny