coreutils 9.3
coreutils/man/rm.x
Even though "rm" was modified,
====
Sat Apr 20 00:03:09 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
...
* rm.c (rm): Refuse to remove path/. and path/.., as well as `.' and `..', for
POSIX.
...
====
the rm(1) man page completely fails to mention this particular POSIX promise.
If the user already knows how GNU rm will respond to "rm -rf *", they don't
need to look at the man page.
If the user does *not* know how GNU rm will respond to "rm -rf *", the GNU rm
man page is not going to help them.
Language should be added to the GNU rm man page explicitly stating the POSIX
behavior:
====
If either of the files dot or dot-dot are specified as the basename portion of
an operand (that is, the final pathname component) or if an operand resolves to
the root directory, rm shall write a diagnostic message to standard error and
do nothing more with such operands.
====
including the additional requirement with respect to the root directory.