Seen on NetBSD 2.0.2:
$ rm -rf
usage: rm [-f|-i] [-dPRrvW] file ...
$ type rm
rm is hashed (/bin/rm)
I think this qualifies as a portability pitfall. How about documenting it?
2006-10-24 Bruno Haible <[EMAIL PROTECTED]>
* doc/autoconf.texi (Limitations of Usual Tools): One more note about
rm.
*** doc/autoconf.texi 23 Oct 2006 06:12:40 -0000 1.1099
--- doc/autoconf.texi 24 Oct 2006 20:39:29 -0000
***************
*** 13597,13602 ****
--- 13597,13605 ----
@prindex @command{rm}
The @option{-f} and @option{-r} options are portable.
+ @samp{rm -rf} without arguments does nothing on many systems, but fails
+ with an error message on NetBSD 2.0.2.
+
A file might not be removed even if its parent directory is writable
and searchable. Many Posix hosts cannot remove a mount point, a named
stream, a working directory, or a last link to a file that is being