-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Otheus on 7/23/2008 3:08 AM: | I'm a very long-time unix user, and I just noted that in RHEL5, version 5.97 | (and reproduced again on 6.9) of coreutils,
Consider upgrading; the latest stable version is 6.12. | the rm command behaves | improperly: It prompts the user for removal of a read-only file, even when | the -i option is not specified (using /bin/rm, no aliases, etc). This is specified by POSIX: http://www.opengroup.org/onlinepubs/009695399/utilities/rm.html We can't change it without adding an extension command-line argument, at which point, you aren't guaranteed that the extension exists as you move between machines. | Further, it | removes it when input is provided by /dev/null. Essentially, there is no | way to use the rm command to skip over read-only files without prompting the | user!! Actually, it WOULD have prompted, if stdin were a terminal or if you had used -i. But since neither of those are true, you are correct that no question is asked, and hence no answers are read from /dev/null so that the files are removed, also required by POSIX. | This is a serious bug, IMHO. While there is a 'yes' command to force | an arbitrary answer to all commands ("yes n" will produce line-terminated | "n"'s until the pipeline terminates), it does not work with rm!! You are correct about the behavior, but just because it is undesirable doesn't mean it is a bug. | | I shudder to think of the disastrous consequences this has had. We feel your pain. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkiHInMACgkQ84KuGfSFAYBHPwCeKmrNXcEYRbXGBPW30EONFej0 HUEAoJQar4iLP5OxkHwY/2xNO7NLtmex =DE7e -----END PGP SIGNATURE----- _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
