Force cp to overwrite


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
Comment on this article using form below. Requires email login only for authentication. HTML forbidden, Markdown only.