[PATCH] /bin/rm Add "all" interactive option
Matthew Dillon
dillon at apollo.backplane.com
Mon Dec 20 00:54:00 PST 2004
:Beyond making sure the rm utility tells the user whether they are being
:asked to remove a file or directory, as in the following patch, I don't
:see the connection between a user not knowing what they are doing when
:using "rm -rf" and a user using "rm -i".
:
:So no, it was not discussed.
:
:The -i option exists. It is part of POSIX. It probably will not go away
:no matter how much someone screams they think the rm utility should be
:simpler, what they think is UNIX zen, or how it rubs them the wrong way
:because it was not their first love.
:
:
:Most of the anxiety from the usage of -i comes from having to answeer
:yes or no to every file and directory. Adding an "all" option eliminates
:this. It is one of the first things that annoys new users whom have used
:interactive removal utilities with an "all" option.
:
:Besides this, the rm utility in its current form does not give the user
:the list of options that are available when it prompts them.
:
:
:Is there a reason against my patch besides the user should not be stupid
:enough to use -i in the first place?
:
:
:Thanks
:- Jason
:
:<http://www.smethers.net/~jason/patches/rm.c.diff2>
'All' basically defeats the whole purpose of having -i in the first
place. If the user is one that will use 'All' a lot, that self same
user would more likely want to use -I rather then -i, or not use
-I OR -i at all. I don't want to turn 'rm' into a morass of options
that virtually nobody uses, and I don't want to add options to try to
cover every sort of user in between 'newbie' and 'expert', because
most won't use the option or feature correctly anyway. This isn't about
giving the ultimate control of 'rm' to the user, this is about providing
a few simple choices for sysops to make the default. In fact, I can
well see a system operator intentionally defaulting rm to rm -i in
/etc/csh.cshrc and *NOT* wanting to make an 'All' entry available
to his users to shoot themselves in the foot with... instead forcing
those who want something else to actually learn something about UNIX
to make their own alias.
So, no, I don't think 'All' is a good fit to 'rm'.
-Matt
More information about the Submit
mailing list