Why does 'cp -f' not work anymore?

Richard Bullington-McGuire rbulling at pkrinternet.com
Tue Nov 1 19:43:33 UTC 2005


On Fri, 28 Oct 2005, Chris W. Parker wrote:

> Anmol Bedi <mailto:anmolbedi at gmail.com>
>    on Friday, October 28, 2005 11:21 AM said:
>
>> Cp command itself is an alias.
>>
>> Give the command alias and you would see that cp = cp -i
>>
>> So its always asking.
>
> Oh, that's what I thought might be happening. I did 'grep -i alias
> *|grep cp' within /etc but it didn't return anything. Where can I find
> the alias definition so I can change it?

Someone else mentioned checking your $HOME/.bashrc (that references 
/etc/bashrc on my system), but if you want the alias to work most of the 
time, a trick for selectively disabling the alias is to enclose the cp 
command in single quotes:

'cp' -f newfile.txt this-has-to-go.txt

-- 
  Richard Bullington-McGuire, Managing Partner, PKR Internet, LLC
  Email: rbulling at pkrinternet.com  Web: http://pkrinternet.com/
  Phone: +1 (703) 271 0607  Fax: +1 (703) 271 0580
  PGP key IDs:  RSA: 0x9386230  DH/DSS: 0xDAC3028E




More information about the redhat-list mailing list