Package: coreutils
Version: 6.10-3
Severity: normal

"rm -irf *" deletes everything without asking, whereas "rm -rfi *" will
ask for each item.  The conflicting options -i and -f are not handled
well, and this is a problem for such a dangerous command.

At the very least, it must be documented what happens when the
conflicting options -i and -f are both given.  rm, however, is a special
case which needs to be as idiot-proof as feasible.  With "rm -irf" the
user clearly wants interaction, as that is the sole purpose of the -i
option.  The -f option also suppresses other interaction, for example, for
write-protected files.  The fact that it also suppresses -i interaction
is arguably a mis-feature.  The fact that -f silently overrides -i
is not acceptable in such a dangerous command.

I see the following fixes, in order of decreasing desireability:

1) -f no longer suppresses -i interaction
2) -i -f aborts with an error message
3) current behavior documented in the manpage

-- System Information:
Debian Release: lenny/sid
  APT prefers proposed-updates
  APT policy: (500, 'proposed-updates'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.21.3B
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages coreutils depends on:
ii  libacl1                       2.2.45-1   Access control list shared library
ii  libc6                         2.7-10     GNU C Library: Shared libraries
ii  libselinux1                   2.0.59-1   SELinux shared libraries

coreutils recommends no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to