Force cp to overwrite
Fri, Jun 10, 2016 · 1 minute readlinux
It’s always the simple things.
Why wouldn’t my cp overwrite the target files?
More than likely because there is an alias for cp which forces an interactive cp:
# alias
alias cp='cp -i'
Now you can either remove the alias or temporarily suspend it:
## Remove the alias
unalias cp
## Or just suspend it by prefixing the command with \
\cp source target