This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 22451 - cp -f no longer working
cp -f no longer working
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: fileutils (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Aaron Brown
:
: 24457 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-12-18 10:44 EST by Bill Stephens
Modified: 2007-04-18 12:30 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-12-18 11:33:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Bill Stephens 2000-12-18 10:44:16 EST
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 10:52:04 EST
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 11:33:41 EST
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 16:09:57 EST
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 12:02:33 EST
*** Bug 24457 has been marked as a duplicate of this bug. ***
Comment 5 pogosyan 2001-03-25 17:54:52 EST
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 06:59:33 EST
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.