On Sat, Dec 17, 2011 at 10:32:06AM -0800, Josh Dersch wrote:
On 12/17/2011 3:33 AM, Alexander Schreiber wrote:
On Fri, Dec 16, 2011 at 07:22:02PM -0800, Josh
Dersch wrote:
Let's start with the "rm *" example.
"rm *" is a particular
invokation of rm that isn't commonly used -- it's an exceptional
case that someone really wants to delete all files in a particular
directory. Is it annoying to anyone to either answer "y" to an "Are
you sure?" prompt or type in "rm -y *" to autoconfirm in these few
cases?
Bad idea, breaks the generic user interface assumption that the machine
just goes and does what it is being told instead of nagging you with
"are you really sure?" prompts in the default case.
Yeah, that was kind of the point. I honestly don't care about
people's attitude about "nagging" in edge cases and I'm happy to
change Unix behavior for these cases.
And I don't care about people who want to pad all the sharp corners in the
world with something soft. You are, of course, free to change your system
and offer the changes to others, but I know a lot of people who won't
find many polite words for something like that ;-)
But again, that is the power of Unix systems: it isn't cast in stone
and can accomodate a wide range of needs.
Unix standard:
the training wheels are off, the user is assumed to know WTF
he/she/it is doing. If you want the training wheels, switch them on
explicitly, but don't annoy the experts all the time. ;-)
Again, I disagree with this. *EVERYONE* gets screwed by this
behavior from time to time. "Experts" don't get annoyed "all the
time" by this (quick question -- how often in a given week do you
run "rm *" ?
I don't really keep track of stuff like that, but I guess a few times.
How much longer would it take you to append
"-y" to
those invocations?)
Too long. And .aliases isn't any help because I work on dozens of systems
a week, usually as root. And those _don't_ get personalized for obvious
reasons.
In that case of
rm, the "training wheels on" mode is already available, just
use "rm -i".
Even if it is slightly more work, think of the
tradeoff
that's being made: you're saving every Unix user the pain of
accidentally screwing themselves via a typo -- and just as evidenced
by responses on this list, *everyone* (well, mostly everyone) has
managed to do this at least once or knows someone who has.
Live and learn. And pain
is a very powerful mnemonic fixative ;-)
I don't think it works that way. Honestly, this is the attitude I'm
talking about that I think needs correction -- the attitude that
"real" Unix users never make mistakes and if they do, they *deserve*
it.
Of course "real" Unix users make mistakes, because only nobody is perfect
and he is currently on vacation, the lazy bastard. But lulling users into
the belief that everything safe and rounded and padded and they can bang
their head against anything without pain ... bad idea IMHO.
Cue the story of the Linux admins using killall as root on a Solaris box ;-)
It's computer-based Stockholm Syndrome as far as
I'm
concerned...
Hey, no calling names!
Kind regards,
Alex.
--
"Opportunity is missed by most people because it is dressed in overalls and
looks like work." -- Thomas A. Edison