emacs-devel
[Top][All Lists]
Advanced

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

Re: Dangerous shell commands?


From: Manoj Srivastava
Subject: Re: Dangerous shell commands?
Date: Wed, 12 Mar 2008 19:14:50 -0500
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) (x86_64-unknown-linux-gnu)

On Wed, 12 Mar 2008 21:21:51 +0100, Reiner Steib <address@hidden> said: 

> On Wed, Mar 12 2008, Manoj Srivastava wrote:
>> On Wed, 12 Mar 2008 11:12:05 -0400, Richard Stallman <address@hidden>
>> said:
>> 
>>> A more plausible scenario is if I have recently run "rm -rf .", in a
>>> directory where that was appropriate.  Now I have cd'd to a
>>> different directory (perhaps even my home directory), where
>>> executing that command could do damage.
>> 
>>> Yes, it could.  But what can we do about that rare case without
>>> causing lots and lots of hassles in more common cases?
>> 
>> The shell that I occassionally use, zsh, has an optional mechanism
>> that intercepts "rm -rf *", and asks a y-or-n-p kind of question,
>> *but* (and this is critical) -- adds a 10 second window where
>> keystrokes are ignored.  I like that feature, it makes me take a time
>> out, think about what I am doing, and prevents my fingers from
>> learning "rm -rf *<RET>y<RET>" as the sequence to use.

> If I type `rm -rf', I actually *want* "never prompt".  If I'd like to
> have "prompt before every removal", I use `-i'.

        Actually, I like zsh presenting me a middle path, not the black
 or white options you present here.  If I want a prompt on every rm
 invocation, I use rm -i.  I also do not want prompts when I say rm -rf A*

        I do like having a prompt when I say "rm -rf *" ; since that is
 fraught with possibility of danger.


        So, this is not always prompt, nor is it never prompt, it is
 "optionally" sometimes prompt for the most risky uses of rm -rf.

        I like the nuanced prompting option.

        manoj

-- 
IBM Advanced Systems Group -- a bunch of mindless jerks, who'll be first
against the wall when the revolution comes...  -- with regrets to
D. Adams
Manoj Srivastava <address@hidden> <http://www.golden-gryphon.com/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C





reply via email to

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