Mailinglist Archive: opensuse (924 mails)

< Previous Next >
Re: [opensuse] Re: add prompt to rm command
Hello,

On Thu, 18 Oct 2012, Anton Aylward wrote:
David Haller said the following on 10/18/2012 07:06 AM:
Really: DO NOT ALIAS 'rm' TO 'rm -i'. EVER.

THINK before you type and hit enter.

I really don't like absolutes, except for a few physical constants.
Religious zealots may have their own set of absolutes they believe in,
but that isn't applicable here either.

To alias 'rm' is as aliasing gravity. You just don't. Or can't.

You may choose to ignore things, in private, at home. But don't tell!
I won't tell you about 'touch ./-i' either.

But: aliasing rm is just evil. You get used to use rm without
thinking, in the knowledge of having the safety net of '-i' at
work. Until you don't. And, as I've said, as per Murphy, that will
affect at the most inconvenient time the most important file.

In short: only use 'rm' as is. Think about it being aliased/scripted
or replaced by 'rm -f'.

If you don't want to use 'rm' in the way it was intended to (see
above), then just do not use it. Use a UI. Like mc or any of the GUIs
and their "filemanagers" ... The latter usually also have a "Feature"
called "Trash" (which they move the "deleted" files to, keep metadata
(AFAIK) and can restore them from using the metadata). Bah!

If you want to use 'rm -i', then do. Using 'rm -i'. Or create a
_SEPERATE_ alias like 'rmi' and use that.

There's also the case where you e.g. _really_ want to clean out a
folder (by pattern), and call e.g. 'rm 20101009*~'. Now. There's about
10k files matching the pattern '20101009*~'. Do you still want the
alias then? No? Why? EXCACTLY!

So, Anton, this is _not_ a case of "religion", this is _the_ case of
it not being such. A lot of stuff regarding the shell is up to
discussion, but this case is out. 'rm' has to be '/bin/rm'. And yes,
fuck anyone wanting to move that to /usr sideways with a chainsaw.

*GAH* /bin, /sbin and /lib[64] are there for a reason. I HATE initrds.
It's ok for distro's to use them, but forcing everyone to one FS or
using an initrd by moving stuff to /usr? Whatever they smoked, it's
been bad. Very bad. Mindblowingly bad (sic).

-dnh

--
The first time I had sex, I was terrified. I was alone.. -- Larry Cunningham
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >