[RH List] how to copy a file , and ignore the prompt...
Stuart Sears
stuart at sjsears.com
Mon Jul 26 18:36:59 UTC 2004
On Monday 26 July 2004 04:15, Ed Wilts wrote:
> On Sun, Jul 25, 2004 at 07:12:51PM -0600, Ashley M. Kirchner wrote:
> > On Sun, 25 Jul 2004, bruce wrote:
> > > a real basic question. how can i copy a file in linux so that i
> > > ginore/don't respond to the prompt???
> > >
> > > google/help/man pages indicate that cp without the "-i" should work.
> > > when i use:
> > >
> > > cp foo.dat foo1.dat
> > > i still get the prompt if foo1.dat exists.
> >
> > That's because by default, .bashrc will alias 'cp -i' to 'cp' - so
> > you'd have to undo that before it works the way you want it to. Edit
> > your .bashrc file and get rid of the alias.
>
> Even easier than unaliasing the cp command:
>
> /bin/cp foo.dat foo1.dat
just for my 2p (or c, I suppose)-worth:
even easier than giving a complete path...
\cp runs cp ignoring the alias, so
\cp file1 file2
will do what you want
:-)
Stuart
--
Stuart Sears RHCE, RHCX
More information about the redhat-list
mailing list