Bug 22451 - cp -f no longer working
Summary: cp -f no longer working
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: fileutils
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: Aaron Brown
URL:
Whiteboard:
: 24457 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-12-18 15:44 UTC by Bill Stephens
Modified: 2007-04-18 16:30 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-12-18 16:33:44 UTC
Embargoed:


Attachments (Terms of Use)

Description Bill Stephens 2000-12-18 15:44:16 UTC
cp -f still prompts "do you want to overwrite".  Should not prompt, since 
that's the purpose of the -f command.

Comment 1 Bernhard Rosenkraenzer 2000-12-18 15:52:04 UTC
Get rid of the 'cp=cp -i' alias in your ~/.bashrc. See bug #17814 for more
information on why it's not a bug.

*** This bug has been marked as a duplicate of 17814 ***

Comment 2 Bill Stephens 2000-12-18 16:33:41 UTC
Hold on now, so what you're saying is -f no longer does anything.  So why have 
the -f option anymore?  If I remove the -i in bashrc, then I am nolonger 
prompted at all.  I'm sorry but it sounds like 1+1 is adding up to 1 instead of 
2 here.  I agree this is a duplicate of 17814, but either -f needs to work 
again or get rid of the -f override option.

Comment 3 Bernhard Rosenkraenzer 2000-12-18 21:09:57 UTC
See the man page for what -f is supposed to do POSIXally. There's no reason you
can't use -i and -f together (it will overwrite files, but prompt you).
Don't use the cp -i alias and you get what you (and everyone else, myself
included ;) ) want.

Comment 4 Bernhard Rosenkraenzer 2001-01-20 17:02:33 UTC
*** Bug 24457 has been marked as a duplicate of this bug. ***

Comment 5 pogosyan 2001-03-25 22:54:52 UTC
Although you marked this bug as resolved,   the suggestion 'remove -i'  is a bit
ridiculous.
People have cp -i aliased to cp for everyday use, and used to use cp -f  in rare
cases precisely
to override -i. (I want almost always cp -i behaviour, and only somtimes plain
cp, so alias is usefull).
Now what, we have to use full path in this cases ?    

			Regards, Dmitri Pogosyan			

Comment 6 Bernhard Rosenkraenzer 2001-03-26 11:59:33 UTC
Use "unalias cp", "unalias mv", "unalias rm" in your ~/.bashrc. -f is not 
supposed to affect -i at all, according to POSIX.
I don't like it either, but we have to follow standards.


Note You need to log in before you can comment on or make changes to this bug.