Eric Blake wrote:
POSIX does indeed say that, but it applies only when you use 'rm' in a
standards-compliant invocation; the moment you add --no-preserve-root to
your invocation, you are no longer using a standards-compliant
invocation, so all bets are off as far as POSIX goes.
--
Which under GNU tools has mean when POSIX_CORRECTLY=1 is set
in the environment.
It is not.
There is nothing preventing tools functioning in a more userfriendly
manner than POSIX allows in the absence of a request for POSIX_CORRECTLY.
Unless you are telling me that all GNU utils have removed
that and always run in POSIX mode by default.
POSIX was designed to be a lowest common denominator --
not a highest level allowed -- that's why under Gnu/Linux it's
only under a specific request for POSIX compat that lowest level
functionality is enforced.