LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-08-2004, 06:15 AM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 30
Force to copy files


I want to overwrite some files from /tmp/temp1 to /tmp/temp2 , the command is "cp -r -f /tmp/temp1 /tmp/temp2 , both two paths contain nearly the same files , I only want to overwrite it , but when copying the files , it still prompt me to press "Y" even I add the "-f" , I use RH 8 Linux , could suggest what is wrong ? how to force to copy the files ? thx
 
Old 03-08-2004, 07:30 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
What happens if you just do a: cp -rf /tmp/temp1 /tmp/temp2 ?

I tested this on my own machine with -r and -rf and was never prompted for either.
 
Old 03-08-2004, 08:40 AM   #3
dishawjp
Member
 
Registered: Dec 2003
Location: Central New York
Distribution: RH/Fedora/SUSE
Posts: 64

Rep: Reputation: 15
There's a good chance that there's an alias in your .bashrc file that aliases rm to rm -i. This is often put into the root account to prevent "oopsies" that can do serious system damage. If it *really* bothers you, just remove the offending line from your .bashrc and hope you never make a bad typo.

Jim Dishaw

Last edited by dishawjp; 03-08-2004 at 08:55 AM.
 
  


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
how to copy files using C skie_knite007 Programming 8 05-03-2005 02:29 PM
How does one force directory permissions for existing/new files salieg Linux - Newbie 3 05-12-2004 06:58 AM
Copy files dunmarie Linux - Newbie 2 10-29-2003 09:18 AM
how to copy and paste between files and within files Bheki Linux - General 1 02-05-2002 05:29 AM
Why can't I copy files? rdaves@earthlink.net Linux - General 1 05-28-2001 10:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:24 PM.

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