LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-27-2010, 04:42 AM   #1
gsvsmanyam
LQ Newbie
 
Registered: Jun 2009
Location: Hyderabad
Distribution: Suse (rarely Redhat & Fedora)
Posts: 14

Rep: Reputation: 0
How to suppress "Do you want to overwrite" prompt while using cp command


Hi,

How to suppress "Do you want to overwrite" prompt while using cp command. I tried "cp -fr", but it isn't worked.

Anybody help please.

Thank you.
 
Old 02-27-2010, 05:20 AM   #2
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 553

Rep: Reputation: 116Reputation: 116
perhaps you have an alias set up by default? try typing "alias cp" in the shell and see what gets returned.
 
Old 02-27-2010, 05:40 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,731

Rep: Reputation: 2125Reputation: 2125Reputation: 2125Reputation: 2125Reputation: 2125Reputation: 2125Reputation: 2125Reputation: 2125Reputation: 2125Reputation: 2125Reputation: 2125
"\cp ..." will over-ride any alias if present.
 
Old 02-27-2010, 06:45 AM   #4
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
cp isn't supposed to ask by default.

Your distro might have set up an alias that turns "cp" into "cp -i" to be safer.
 
Old 02-28-2010, 02:07 PM   #5
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,125
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
your cp is probably aliased to cp -i

try /bin/cp instead of just cp
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
O'Reilly "Guide" to Command Line prompt definitions - Help! BuckNekkid Linux - General 6 12-06-2009 04:34 AM
Changing the command prompt PS1="****" scotthill Linux - Newbie 7 01-02-2009 11:51 AM
Booting to Ubuntu 8.4, gives me a command prompt..."BusyBox"???? tenchidbz Linux - Software 2 06-13-2008 04:47 PM
How to suppress "\M" when using echo command oskeewow Linux - Newbie 3 04-14-2008 01:05 AM
how to "exit to command prompt" hesher Linux - Newbie 3 06-07-2003 07:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration