[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Dangerous shell commands? (was: CUA mode's C-RET binding)
From: |
Reiner Steib |
Subject: |
Dangerous shell commands? (was: CUA mode's C-RET binding) |
Date: |
Wed, 12 Mar 2008 21:21:51 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
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'.
I also have `unalias cp mv rm ln 2>/dev/null' in my shell init files
to undo stupid alias like alias cp='cp -i'; alias mv='mv -i'; alias
rm='rm -i'.
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
- Re: CUA mode's C-RET binding [was: position on changing defaults?], (continued)
- Re: CUA mode's C-RET binding [was: position on changing defaults?], Mathias Dahl, 2008/03/10
- Re: CUA mode's C-RET binding [was: position on changing defaults?], Lennart Borgman (gmail), 2008/03/10
- Re: CUA mode's C-RET binding [was: position on changing defaults?], Johan Bockgård, 2008/03/10
- Re: CUA mode's C-RET binding [was: position on changing defaults?], Lennart Borgman (gmail), 2008/03/10
- Re: CUA mode's C-RET binding [was: position on changing defaults?], Juri Linkov, 2008/03/10
- Re: CUA mode's C-RET binding [was: position on changing defaults?], Richard Stallman, 2008/03/11
- Re: CUA mode's C-RET binding, Manoj Srivastava, 2008/03/11
- Re: CUA mode's C-RET binding, Juri Linkov, 2008/03/11
- Re: CUA mode's C-RET binding, Richard Stallman, 2008/03/12
- Re: CUA mode's C-RET binding, Manoj Srivastava, 2008/03/12
- Dangerous shell commands? (was: CUA mode's C-RET binding),
Reiner Steib <=
- Re: Dangerous shell commands?, David Kastrup, 2008/03/12
- Re: Dangerous shell commands?, Manoj Srivastava, 2008/03/12
- Re: CUA mode's C-RET binding [was: position on changing defaults?], Mathias Dahl, 2008/03/11
- RE: CUA mode's C-RET binding [was: position on changing defaults?], Drew Adams, 2008/03/11
- Re: CUA mode's C-RET binding [was: position on changing defaults?], Mathias Dahl, 2008/03/13
- RE: CUA mode's C-RET binding [was: position on changing defaults?], Drew Adams, 2008/03/13
- Re: position on changing defaults?, Richard Stallman, 2008/03/11
- Re: position on changing defaults?, Kim F. Storm, 2008/03/08
- Re: position on changing defaults?, Stefan Monnier, 2008/03/08
- Re: position on changing defaults?, Kim F. Storm, 2008/03/08