Re: [Hampshire] cp error

Top Page

Reply to this message
Author: Lisi
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] cp error
On Thursday 19 June 2008 12:32:01 Victor Churchill wrote:
> 2008/6/19 Richard Brown <mynamewasgone@???>:
> > On Thu, Jun 19, 2008 at 12:15, Lisi <hantslug@???> wrote:
> >> Would it be better to use -f, or to undo the alias? I.e. is -f "safe"
> >> in other ways?
> >
> > I think I'd personally either remove the alias whever the distro is
> > setting it, or add unalias cp in my bashrc, depending on how the
> > distro handles changes to config files.
>
> ... or leave the alias as-is but specify /bin/cp in your script.
> That way the cript should do what you want,
> but at the same time if you were to type, in a shell,
> $ cp Rubbish Precious
> then you would still be asked to confirm.


Thanks for this, Victor. In fact, I had come to the same conclusion, having
found what Richard had said I needed in the 4th book I looked in, and have
just done:

# \cp -Rpu /home/. /Backup

which would appear to have worked. And in the extremely unlikely event that
my husband tries his hand at the command line, he won't be able to damage a
whole directory in one fell swoop. ;-) (Nor will I, on someone else's box.
In fact, a far more likely scenario.)

But its useful to know another way to override an alias, for future
reference - I hadn't found that one.

Lisi