bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rm: remove `/tmp/a'? yahoo


From: Alfred M. Szmidt
Subject: Re: rm: remove `/tmp/a'? yahoo
Date: 15 Jul 2002 11:59:26 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Dan Jacobson <address@hidden> writes:
> no, legally it is not a bug.  However, other than the user typing "y"
> and "yes", can't we err on the side of caution?  I mean, how about
> line noise? remember line noise? maybe on some newfangled
> communication device there will be line noise causing yzsf{{{{fff{{
> etc. and once the file is gone, at least for un non wizards, it's gone
> forever.

If someone pastes line noise into their window where rm is running
they deserve whatever they get.  What if the line noise starts with:
rm -rf /?  Should rm stop and ask you if you really want to run this
command? No, that is just stupid.  If someone is pasting things
blindly into windows, leaves rm running or other idiotic things they
deserve what ever they get.

Maybe someone should implement the "baby sitter" daemon that looks at
what the user types and aborts the command if it is evil.

> I mean back at Bell Labs at the time, [yY].* seemed like a easy way to
> cover all cases, but as we all had accidents, say pasting the wrong
> thing into the wrong buffer, you never know.  Plus "oops. I thought it
> was asing which fileS to remove so I typed the yahoo file and caused
> it to not remove the yahoo file but instead the first file it was
> prompting for" --- a junior user might say.

Not a valid scenario, as the prompt clearly states if you want to
remove _this file_.  If someone can't be bothered to read a sentence
then no kind of information will be helpful to them.

> A> This is very file-system specific, and usually needs root access to be
> A> accomplished.
> 
> Well, then all then mention all that too there.  At least give them a
> pointer.

It did give you a pointer (i.e. it is possible to restore the file),
how you find this information is up to you.  Search Google, ask a
friend.  It is out of the scope for the info pages to document.

> Anyway, rm -i, mv -i, cp -i, ln -i ... all need my brilliant "improvement".

Send a patch.  I wouldn't be surprised if this breaks POSIX anyway
(don't have the document at hand to check).

Cheers,
-- 
Alfred M. Szmidt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]