Re: cp command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2006-07-18 at 07:28 -0500, Mike Klinke wrote:
> On Tuesday 18 July 2006 00:29, Kaushal Shriyan wrote:
> > Hi ALL
> >
> > if i will run following command
> >
> > cp /home/deep /home/deepak
> >
> > if deep folder have same 100 files which is under /home/deepak it
> > will ask permission for overwrite
> >
> > i have to enter y 100 times. how can i forcefully over write the
> > files?
> >
> 
> I gather you're doing this logged in as root? If so, this is due to 
> an alias for the 'cp' command.  If you type:
> 
> ---------
> #which cp
> ---------
> 
> you can see that it defaults to using the "-i" parameter as it will 
> display this:
> 
> ----------------
> alias cp='cp -i'
>         /bin/cp
> ----------------
> 
> If you don't want that to happen ( the aliasing ) you can specify 
> the full path to the 'cp' command; i.e.
> 
> --------------------
> #/bin/cp file1 file2
> --------------------
> 
an even easier 2 approaches.
  cp -f  will override the -i and do the copy without prompting for
confirmation
  \cp  will use the default cp command and NOT use the alias.

Either approach will bypass the prompts the OP was getting.


> or use the "--reply" parameter as others have suggested.
> 
> 
> Regards, Mike Klinke
>   
> 

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux