Hi, James Feeney <ja...@nurealm.net> writes:
> 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. This is specified in the manual: > Any attempt to remove a file whose last file name component is ‘.’ > or ‘..’ is rejected without any prompting, as mandated by POSIX. See (coreutils)rm invocation, paragraph 5. Have a lovely night. -- Arsen Arsenović
signature.asc
Description: PGP signature