1 |
So when you have been up for 30 hours you are going to remember to type |
2 |
-c? cause aliasing will break those same shell scripts... |
3 |
|
4 |
this is a pointless debate in my opinion, especially one to have here |
5 |
over a course of days. If you want a safe rm, alias -i and accept |
6 |
breakage, type -i, or just dont use rm... |
7 |
|
8 |
--Todd |
9 |
|
10 |
purslow@×××××××××.ca wrote: |
11 |
> 040530 Thorsten Kampe wrote: |
12 |
> |
13 |
>>* Christian Gut (2004-05-30 11:40 +0100) |
14 |
>> |
15 |
>>>oh well, and it should move everything to a recycle bin |
16 |
>>>and asking two times if you really, really want to delete something. |
17 |
>>>Hey, this is not windows. |
18 |
>> |
19 |
>>It has to do with security. |
20 |
>>Command line deletion is always more dangerous than GUI deletion |
21 |
>>because you cannot see and physically mark the files you want to delete. |
22 |
>>The problem is simply that computer and human beings behave differently |
23 |
>>when doing multiple things at the same time or for a long time. |
24 |
>>Computers don't care how long they've been uptime, |
25 |
>>how many things they do simultaneously |
26 |
>>or if someone is disrupting their concentration. |
27 |
>>People do - and there is nothing to eliminate these things; |
28 |
>>just to put a barrier to the possible disastrous consequences. |
29 |
> |
30 |
> |
31 |
> these msgs seem to sum up the opposite sides of the debate. |
32 |
> |
33 |
> the point i wanted to raise has nothing to do w novices, grannies or M$ : |
34 |
> it's something which can affect the most experienced red-blooded sysadmin |
35 |
> simply because for once in his life he's been working too long |
36 |
> & just before he collapses he enters a cmd w an extra space in it. |
37 |
> when machine guards, safety hats/boots etc were introduced in factories, |
38 |
> there were similar objections from old hands who "didn't need such things", |
39 |
> at least till they ended up in hospital missing a foot/hand/eye. |
40 |
> |
41 |
> yes, there are good reasons not to alter the basic default behaviour of 'rm': |
42 |
> eg thousands of scripts exist out there which depend on it. |
43 |
> however, that doesn't mean that additional flags can't be added to it. |
44 |
> |
45 |
> what is needed is a flag whose action lies between '-f' & '-i': |
46 |
> let's call it '-c' (for 'check': there are lots of spare letters to use). |
47 |
> 'rm -f' & 'rm -i' would continue to do just what they always have done, |
48 |
> but unlike '-i', which asks re each file/dir individually |
49 |
> -- which is why people don't want to use it for big deletions -- , |
50 |
> '-c' would ask just once for the whole set: |
51 |
> it would show the list (after expansion by the shell) & the starting dir, |
52 |
> with a request for confirmation like that offered by Zsh; for extra safety, |
53 |
> the user would have to type 'yes', not just 'y', to confirm deletion. |
54 |
> to allow easy aliasing of 'rm -c' as 'rm', 'rm -c' wd ask for confirmation |
55 |
> just when multiple files were listed or the list was a directory |
56 |
> -- esp this would apply when '*' was expanded by the shell -- , |
57 |
> but not when there was only 1 matching file (not a dir). |
58 |
> |
59 |
> this sb enough to alert the guy who's been working 30 hr , |
60 |
> but would have no effect on all those thousands of scripts, |
61 |
> which wd continue to work with 'rm -f' just like now, |
62 |
> & no-one wb forced to use '-c', if they were willing to take the risk. |
63 |
> |
64 |
> "But that's not POSIX !" -- nor is the GNU 'rm' now used by Gentoo, |
65 |
> which has a couple of extra flags which POSIX doesn't know about. |
66 |
> |
67 |
> so is there any reason -- apart from developer time -- this can't be done ? |
68 |
> |
69 |
|
70 |
|
71 |
-- |
72 |
gentoo-dev@g.o mailing list |