[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug with rm
Re: bug with rm
Wed, 23 Jul 2008 06:22:11 -0600
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:18.104.22.168) Gecko/20080421 Thunderbird/22.214.171.124 Mnenhy/0.7.5.666
-----BEGIN PGP SIGNED MESSAGE-----
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:
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
| 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
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 address@hidden
-----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
-----END PGP SIGNATURE-----
- bug with rm, Otheus, 2008/07/23
- Re: bug with rm,
Eric Blake <=