unbelievably stupid mistake - i broke /usr/lib need help

Jeff Vian jvian10 at charter.net
Mon Jan 9 20:14:15 UTC 2006


On Mon, 2006-01-09 at 11:10 -0700, Robin Laing wrote:
> Paul Howarth wrote:
> > On Fri, 2006-01-06 at 13:19 -0700, Robin Laing wrote:
> > 
> >>The first thing I usually do is make an aliases for rm, cp and mv to 
> >>ask for confirmation.
> >>
> >>alias rm='rm -i'
> >>alias cp='cp -i --backup=t'
> >>alias mv='mv -i --backup=t'
> > 
> > 
> > I think this is bad practice. When you have this setup, you can get in
> > the habit of rm etc. asking about deletions, which can lead to the habit
> > of not listing carefully on the command line the list of items to be
> > deleted. This can then be a problem if you're using a system on which
> > this alias isn't present, or if an error has been made further up the
> > ~/.bashrc (or wherever) causing the alias not to be set - the
> > confirmation prompts don't happen and by the time you've realised what's
> > happened it can be too late.
> > 
> > Paul.
> > 
> 
> I partially agree.  But sometimes the tools are useful for what I do. 
>   I do allot of file moves with CLI and these work out best for me.
> 
> Hey, I think I will write myself a root rm script that actually takes 
> the file and moves it to a trash directory instead of removing it. 
> This may be the best option.  Now to find the time.  :)
> 
That seems a reasonable option.  
The caveat here is that your script MUST be in front of the system rm in
your path to be sure the proper command is being used.  Also remember
that an alias gets used *before* any system commands (built-in or
executable).




More information about the fedora-list mailing list