Re: RFC: preventing accidental deletion of system directories

2008-03-27 Thread Ben Hutchings
On Sun, 2008-03-23 at 18:54 +0100, Milan P. Stanic wrote: > On Sun, Mar 23, 2008 at 04:55:52PM +, Lesley Binks wrote: > > In *nix based systems rm has always meant rm - deleting files does just > > that. > > The KDE Desktop provides the option to keep this functionality or have > > temporary t

Re: RFC: preventing accidental deletion of system directories

2008-03-23 Thread Milan P. Stanic
On Sun, Mar 23, 2008 at 04:55:52PM +, Lesley Binks wrote: > In *nix based systems rm has always meant rm - deleting files does just that. > The KDE Desktop provides the option to keep this functionality or have > temporary trash can on the desktop. However, you don't get the option > of a tras

Re: RFC: preventing accidental deletion of system directories

2008-03-23 Thread Darren Salt
I demand that Andrew M.A. Cater may or may not have written... > On Sat, Mar 22, 2008 at 05:12:50AM -0500, William Pitcock wrote: [snip] >> Maybe asking "Are you sure you want to do this", but outright refusing >> to do something seems quite ridiculous to me. > Of course, knowing that I do such t

Re: RFC: preventing accidental deletion of system directories

2008-03-23 Thread Lesley Binks
On 23/03/2008, Andrew M.A. Cater <[EMAIL PROTECTED]> wrote: > On Sat, Mar 22, 2008 at 03:50:32PM -0500, William Pitcock wrote: > > Hi, > > > > On Sat, 2008-03-22 at 13:51 +0100, Adam Borowski wrote: > > > To get those Vistaesque questions, "alias rm='rm -i'" is surely not > > > worth a > > >

Re: RFC: preventing accidental deletion of system directories

2008-03-23 Thread Andrew M.A. Cater
On Sat, Mar 22, 2008 at 03:50:32PM -0500, William Pitcock wrote: > Hi, > > On Sat, 2008-03-22 at 13:51 +0100, Adam Borowski wrote: > > To get those Vistaesque questions, "alias rm='rm -i'" is surely not > > worth a > > package. It's slightly larger in scope, but only slightly, as > > removing > >

Re: RFC: preventing accidental deletion of system directories

2008-03-23 Thread Steinar H. Gunderson
On Sat, Mar 22, 2008 at 09:14:57AM -0400, Roberto C. Sánchez wrote: > Of course, knowing that I do such things on occasion, I have aliased > 'rm' to 'rm -i', so it will ask unless I pass '-f' along. Speaking from experience, this kind of behavior makes people use "rm -f" all the time, which means

Re: RFC: preventing accidental deletion of system directories

2008-03-23 Thread Bernhard R. Link
* William Pitcock <[EMAIL PROTECTED]> [080322 21:49]: > Yes, that's what I mean: what's wrong with making rm -i the default > behaviour? We could do that by simply patching coreutils. The biggest problem with rm -i is that there is no switch reverting it. There is -f, but that means deleting every

Re: RFC: preventing accidental deletion of system directories

2008-03-23 Thread Oohara Yuuma
On Sat, 22 Mar 2008 22:16:12 +1300, Francois Marier <[EMAIL PROTECTED]> wrote: > - how to get this script to be picked up before 'rm' in the PATH (including > when using sudo) or whether it should be an alias in all of the shell > global config files (like /etc/bash.bashrc) Call the script dir

Re: RFC: preventing accidental deletion of system directories

2008-03-23 Thread Mike Hommey
On Sat, Mar 22, 2008 at 03:50:32PM -0500, William Pitcock wrote: > Hi, > > On Sat, 2008-03-22 at 13:51 +0100, Adam Borowski wrote: > > To get those Vistaesque questions, "alias rm='rm -i'" is surely not > > worth a > > package. It's slightly larger in scope, but only slightly, as > > removing > >

Re: RFC: preventing accidental deletion of system directories

2008-03-22 Thread William Pitcock
Hi, On Sun, 2008-03-23 at 00:08 +, Steve McIntyre wrote: > Christ, no. If you want Fedora you know where to find it. I was being sarcastic. But it's certaintly better than making some script the default. Optimally no change to rm is best unless you opt in. William signature.asc Descriptio

Re: RFC: preventing accidental deletion of system directories

2008-03-22 Thread Steve McIntyre
William wrote: > >On Sat, 2008-03-22 at 13:51 +0100, Adam Borowski wrote: >> To get those Vistaesque questions, "alias rm='rm -i'" is surely not >> worth a >> package. It's slightly larger in scope, but only slightly, as >> removing >> files as root means you mess with system directories, right?

Re: RFC: preventing accidental deletion of system directories

2008-03-22 Thread Manoj Srivastava
On Sat, 22 Mar 2008 15:50:32 -0500, William Pitcock <[EMAIL PROTECTED]> said: > Hi, > On Sat, 2008-03-22 at 13:51 +0100, Adam Borowski wrote: >> To get those Vistaesque questions, "alias rm='rm -i'" is surely not >> worth a package. It's slightly larger in scope, but only slightly, >> as removi

Re: RFC: preventing accidental deletion of system directories

2008-03-22 Thread Eugene V. Lyubimkin
William Pitcock wrote: Hi, On Sat, 2008-03-22 at 13:51 +0100, Adam Borowski wrote: To get those Vistaesque questions, "alias rm='rm -i'" is surely not worth a package. It's slightly larger in scope, but only slightly, as removing files as root means you mess with system directories, right?

Re: RFC: preventing accidental deletion of system directories

2008-03-22 Thread Martijn van Oosterhout
On Sat, Mar 22, 2008 at 10:16 AM, Francois Marier <[EMAIL PROTECTED]> wrote: > Having recently deleted my /usr/lib by mistake (and gone through the pain of > reinstalling all of my packages), I wrote a little Perl script which I have > now aliased to "rm" in my .bashrc. At one point I set my sy

Re: RFC: preventing accidental deletion of system directories

2008-03-22 Thread William Pitcock
Hi, On Sat, 2008-03-22 at 13:51 +0100, Adam Borowski wrote: > To get those Vistaesque questions, "alias rm='rm -i'" is surely not > worth a > package. It's slightly larger in scope, but only slightly, as > removing > files as root means you mess with system directories, right? Yes, that's what

Re: RFC: preventing accidental deletion of system directories

2008-03-22 Thread Roberto C . Sánchez
On Sat, Mar 22, 2008 at 05:12:50AM -0500, William Pitcock wrote: > Hi, > > On Sat, 2008-03-22 at 22:16 +1300, Francois Marier wrote: > > Basically, the wrapper (see attached file) has a blacklist which > > contains > > directories like /usr/lib, /home, /etc and removes those before > > passing its

Re: RFC: preventing accidental deletion of system directories

2008-03-22 Thread Adam Borowski
On Sat, Mar 22, 2008 at 05:12:50AM -0500, William Pitcock wrote: > On Sat, 2008-03-22 at 22:16 +1300, Francois Marier wrote: > > Basically, the wrapper (see attached file) has a blacklist which > > contains > > directories like /usr/lib, /home, /etc and removes those before > > passing its > > argu

Re: RFC: preventing accidental deletion of system directories

2008-03-22 Thread William Pitcock
Hi, On Sat, 2008-03-22 at 22:16 +1300, Francois Marier wrote: > Basically, the wrapper (see attached file) has a blacklist which > contains > directories like /usr/lib, /home, /etc and removes those before > passing its > arguments to the real 'rm' command. While I'm sorry for you having to reins

Re: RFC: preventing accidental deletion of system directories

2008-03-22 Thread Loïc Minier
On Sat, Mar 22, 2008, Francois Marier wrote: > P.S. I realize that 'rm' is a low-level command which should do what it's > told, but the reality is that a lot of people use it directly on a daily > basis and can accidently hose their system. I don't want to implement a > "command-line trashcan", b