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.

Be The First To Comment
Related Post
Please Leave Your Comments Below