Home > Linux > cp -Rf still promt for confirmation ?

cp -Rf still promt for confirmation ?



I was getting so frustrated when I try to copy and overwrite files in my CentOS linux, it keeps asking for confirmation even I added the -f (force) command.

# cp -Rf * backup/
cp: overwrite ‘index.php?’ y

Then I search around and finally found a solution ! It was an alias preset for the c, which alias -i to ask for confirmation.

#alias
alias cp= ‘cp -i’
alias l.=’ls -d .* –color=tty’
alias ll=’ls -l –color=tty’
alias ls=’ls –color=tty’
alias mv=’mv -i’
alias rm=’rm -i’
…….

Remove the cp alias

#unalias cp

Done, you should be able to cp -f without the confirmation now.

Categories: Linux Tags: ,
  1. No comments yet.
  1. No trackbacks yet.